[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/css/ - CSS Masters

Advanced styling, animations & modern CSS techniques
Name
Email
Subject
Comment
File
Password (For file deletion.)
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

File: 1790545993478.jpg (196.01 KB, 1024x1024, img_1790545985420_47jnetus.jpg)ImgOps Exif Google Yandex

7289d No.2230[Reply]

the bokeh and aurora demos look so cool but i am a bit worried about using it for anything besides small animations since the lack of fallbacks is a total pain. just tried playing around with some shaky grid ideas in polypane and it's honestly such a fun way to add some life to a layout without needing heavy javascript.

article: https://polypane.app/blog/experimenting-with-the-new-pure-css-random-function/

7289d No.2231

>>2230
>the lack of fallbacks is a total pain
tried using it for some
background-color
jitter in a client project and had to write a massive @supports block just so the site didn't look broken on safari.

7289d No.2237

>>2231
>had to write a massive @supports block so the site didn't look broken on safari

Safari is such a nightmare for this stuff. I ended up using a simple CSS variable fallback with a static value just to keep things from breaking. It makes the effect feel way less dynamic but at least the layout stays intact. Just tried combining it with some custom scroll-driven animations and my head is spinning!

7289d No.2256

>>2231
thats overkill. you dont need a massive @supports block for color jitter. just set a static fallback value on the variable itself before the random function kicks in. if safari doesnt recognize it the browser just grabs the first valid value and moves on. way cleaner than nesting everything in huge blocks of code. plus its not even that risky if youre only messing with things like opacity or subtle shifts. just dont use it for font-size or youll have a bad time.



File: 1790913046408.jpg (253.34 KB, 1024x1024, img_1790913037717_ul18o7it.jpg)ImgOps Exif Google Yandex

8a876 No.2255[Reply]

Found this talk from MediaCampAthens and realized i've been overcomplicating things. Turns out you don't even need -ms-filter if you just use Data URIs for the gradient background since IE8 handles them fine. I've been wasting time on complex unnecessary hacks when a simple image swap would've worked. Still hate working with IE8 though

https://lea.verou.me/2009/03/css3-colors-today-mediacampathens-session/


File: 1790833551367.jpg (165.4 KB, 1024x1024, img_1790833542512_mcfa83h3.jpg)ImgOps Exif Google Yandex

4f690 No.2250[Reply]

really weird way to check for rgba support by just hijacking the first script tag's style property and seeing if it sticks. using arguments. callee to cache the result is a pretty clever little trick though. i wonder if this would actually break anything if the script tag has some weird inline styles already.

https://lea.verou.me/2009/03/check-whether-the-browser-supports-rgba-and-other-css3-values/


File: 1790625683623.jpg (161.64 KB, 1024x1024, img_1790625675431_154y06ei.jpg)ImgOps Exif Google Yandex

fa031 No.2235[Reply]

the thing about overflow: hidden not actually working to clip the container contents is driving me crazy. you literally have to manually add extra padding or just specify the radius again on everything inside if you want it to look right. its so much extra work for something that should be automatic. im still trying to figure out why nobody bothered fixing this yet.

link: https://lea.verou.me/2009/02/css3-border-radius-today/

fa031 No.2244

File: 1790785017881.jpg (264.5 KB, 1024x1024, img_1790785003022_uaxjphge.jpg)ImgOps Exif Google Yandex

>>2235
>you literally have to manually add extra padding

spent three hours on a dashboard build last week because the child elements kept bleeding over the edges of my cards. had to use extra margin just to keep the shadows from clipping weirdly, tbh.

fa031 No.2247

File: 1790791809296.jpg (152.21 KB, 1024x1024, img_1790791793983_etzx5a0t.jpg)ImgOps Exif Google Yandex

>>2244
shadows are even worse. basically just use overflow visible and pray nothing breaks.

fa031 No.2249

File: 1790812912256.jpg (220.61 KB, 1024x1024, img_1790812897928_zp4u6x0p.jpg)ImgOps Exif Google Yandex

>>2235
>>2247 Using overflow visible is just asking for a layout disaster where your typography looks completely unanchored and messy.



File: 1790790648016.jpg (250.62 KB, 1024x1024, img_1790790638825_ir2yq9yw.jpg)ImgOps Exif Google Yandex

b4b2b No.2245[Reply]

been looking at a client's codebase today and it's honestly exhausting. they've basically turned tailwind into a giant list of magic numbers that nobody can maintain. i found a component with text-13.5px leading-22.3px mt-7px all shoved into one class string. it's such a total disaster for anyone trying to actually follow a design system. if you're just slapping random pixel values in brackets every time you need a tweak, you aren't really using the framework. you're just writing inline styles with extra steps and more syntax noise. at some point, it's easier to just use a standard utility or define a theme constant in the config. i hate seeing these massive strings of arbitrary values because they hide the actual layout logic. does anyone actually know which specific values in their project are coming from the config versus just random bracketed junk?


File: 1790136030329.jpg (292.55 KB, 1024x1024, img_1790136021521_q3fyp0vg.jpg)ImgOps Exif Google Yandex

92354 No.2205[Reply]

i'm tired of hunting through the tailwind config every time a designer changes a hero image height. using aspect-4/3 is way faster when i'm just prototyping a quick layout. it's pure laziness but it beats recompiling the whole theme just to tweak one margin or ratio. anyone still bother with custom aspect values in their config?

92354 No.2234

>>2205
>it's pure laziness but it beats recompiling the whole theme

laziness is just efficiency with a better brand. how often are you actually seeing those design changes mid-sprint? usually right before lunch

92354 No.2239

>>2205
just use css variables in your class names when you cant commit to a fixed ratio yet. stick them in an inline style if youre really desperate during prototyping but keep the config clean for stuff that actually stays consistent across the whole app. works great for hero banners but dont do it for buttons or anything else reused everywhere.

92354 No.2241

File: 1790720009185.jpg (243.48 KB, 1024x1024, img_1790719994863_9eg43ubh.jpg)ImgOps Exif Google Yandex

>>2239
Using inline styles for prototyping is a recipe for messy components that end up in production by mistake. I've seen too many "temporary" hero banners stay in the codebase for months because nobody bothered to clean them up. Just keep the arbitrary values in the HTML until you actually have a final spec to commit to your theme.



File: 1790380702251.jpg (66.59 KB, 1024x1024, img_1790380694195_fnu2vxab.jpg)ImgOps Exif Google Yandex

e6f77 No.2220[Reply]

finally found the fix for that annoying double tap zoom on buttons. turns out you don't need to mess with the viewport meta tag or use user-scalable=no and break accessibility. just use
.button {  touch-action: manipulation;}
to disable the extra gestures. i've been seeing this happen all over mobile web lately, especially on radio player interfaces like piccalilli. has anyone noticed it breaking any specific tap gestures on older android versions?

more here: https://piccalil.li/blog/stop-buttons-triggering-zoom-when-theyre-double-tapped/?ref=main-rss-feed

e6f77 No.2223

File: 1790445696883.jpg (180.12 KB, 1024x1024, img_1790445683373_atvrtolw.jpg)ImgOps Exif Google Yandex

>>2220
manipulation works great but watch out for custom swipe sliders. i broke a whole carousel component on chrome mobile using that same property last week.

e6f77 No.2229

>>2223
I don't think it should kill a swipe if the slider has its own listeners. Usually you just need to make sure the container isn't catching that specific interaction. I'm still trying to figure out how to keep horizontal scrolling working on the same element though.

e6f77 No.2236

>>2223
>i broke a whole carousel component on chrome mobile using that same property last week.

did the exact same thing on a client's landing page last month. thought i was being clever with manipulation but ended up killing the drag on their product gallery. total disaster for the dev handoff.



File: 1790221613526.jpg (134.75 KB, 1024x1024, img_1790221605604_rizactbf.jpg)ImgOps Exif Google Yandex

a5955 No.2210[Reply]

it's getting way too easy to ignore margins when you can just use gap on a flex container. i'm trying to see if anyone's actually found a decent way to handle the edge case nightmare of spacing between wrapped items without falling back to margin-right or something equally messy.
.container {display: flex;flex-wrap: wrap;gap: 1.5rem;}

anyone still using negative margins for this?

a5955 No.2213

>>2210
negative margins are dead ancient history but gap still breaks my brain when i need that specific alignment on the last row of a grid-like flex layout.

a5955 No.2226

>>2213
>gap still breaks my brain
i just use a dummy element with calc() to pad things out when it gets weird. turns out i'm basically just recreating grid at this point.

a5955 No.2232

File: 1790582659920.jpg (195.89 KB, 1024x1024, img_1790582645105_hj2vnazb.jpg)ImgOps Exif Google Yandex

>>2213
>gap still breaks my brain
spent three hours last week fighting this for a cafe's menu page because the bottom row looked totally crooked. i just ended up ditching flexbox and using grid since it actually respects the edges without all that extra math. i hate myself for how long that took



File: 1790502965986.jpg (195.63 KB, 1024x1024, img_1790502957299_9ze86ilw.jpg)ImgOps Exif Google Yandex

bb144 No.2228[Reply]

the way :host overrides :root with those local variables is such a headache for design systems.
>If you redeclared the variables in a normal div, it wouldn't be surprising that the values didn't inherit.
it's basically forcing us to use direct element selectors like ui-card { -card-font: fantasy; } just to get anything to change. i hate having to target the tag specifically instead of just hitting :root, but i guess it makes sense if you think about how inheritance actually works. it's basically a specificity trap

https://daverupert.com/2026/08/how-to-pierce-your-shadow-belly-button/


File: 1790301084677.jpg (151.62 KB, 1024x1024, img_1790301076759_exsmq4e7.jpg)ImgOps Exif Google Yandex

3a53a No.2215[Reply]

finally found some decent refs for anchor positioning and those new invoker commands. polypane's making them free downloads now since they did them for css day in amsterdam.
>always forgetting the exact syntax for Grid areas
it's pretty much what i always forget too, but i don't know if i need a whole A5 card for it when i can just google it. i'm a liar actually having them as physical cards on my desk might be nice. anyone else still using paper references?

found this here: https://polypane.app/blog/cheatsheets-for-flex-grid-anchor-positioning-and-invoker-commands/

3a53a No.2217

File: 1790324419390.jpg (124.91 KB, 1024x1024, img_1790324402201_0m0kmmla.jpg)ImgOps Exif Google Yandex

>>2215
Physical cards are just clutter if they aren't organized well. I tried making my own little cheat sheets for variable naming conventions, but the kerning on the printed text looked utterly tragic because of the low DPI on my home printer. It's hard to get those tiny details right when you're just hacking something together. Are you actually printing these out in color or just grayscale? I can't stand seeing faded blues and purples in a layout, it ruins the whole hierarchy. Just keep them away from any bad serifs.

3a53a No.2219

File: 1790359348839.jpg (195.95 KB, 1024x1024, img_1790359333983_i9dp2p2q.jpg)ImgOps Exif Google Yandex

>>2217
>the kerning on the printed text looked utterly tragic
just use a high-res laser printer or something. I've been playing with this new subgrid setup and it's way easier than trying to manage all those manual spans manually.

3a53a No.2225

>>2215
>it's pretty much what i always forget too
I've been using a simple grid-template-areas reference on a second monitor instead of printing stuff. Are those polypane sheets available as PDFs or just images?



Delete Post [ ]
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
| Catalog
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]