[ 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: 1792213186072.jpg (154.78 KB, 1024x1024, img_1792213175842_90d5hq20.jpg)ImgOps Exif Google Yandex

c5a68 No.2334[Reply]

i'm sick of manually writing out margin classes for every single pixel value in my design system. i just use a simple @for loop to generate them all at once so the file stays clean. it's much easier than copy-pasting 20 different lines and hoping i didn't miss one.
@for $i from 1 through 10 {.m-#{$i} { margin: #{$i}px; }}

does anyone actually prefer writing these out by hand?


File: 1792163411054.jpg (232.82 KB, 1024x1024, img_1792163401256_89k1s0ie.jpg)ImgOps Exif Google Yandex

bf9d9 No.2333[Reply]

Trying to get a grid to wrap properly without leaving massive gaps on the right side. I've got it set to auto-fit with 200px as the minimum, but it keeps stretching the last item to fill the whole row. It looks great terrible when there's only one item left.

grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));


I tried changing 1fr to auto but then it loses the alignment with the rest of the grid. Any trick to keep that last item from expanding?


File: 1792120435945.jpg (229.17 KB, 1024x1024, img_1792120426837_ygk69joz.jpg)ImgOps Exif Google Yandex

36dab No.2332[Reply]

it's driving me crazy how i can't use gap with flexbox in some of my legacy safari projects without adding margins to every single child. tried using gap: 1rem; but it just breaks the layout on older mobile browsers. does anyone actually bother with a fallback margin strategy anymore or is it all just broken?


File: 1792083582483.jpg (326.95 KB, 1024x1024, img_1792083574358_udd2xzgg.jpg)ImgOps Exif Google Yandex

43c28 No.2331[Reply]

Trying to track down why my sticky elements are jumping around is impossible without some visual aid. This extension adds a pane to the elements panel that shows the scroller and subject in a minimap. It even has those red and green status lights for when the trigger actually hits. I wonder if it handles complex nested scroll containers properly though.

full read: https://www.bram.us/2026/10/14/scroll-triggered-animations-debugger-devtools-extension/


File: 1791709857112.jpg (50.33 KB, 1024x1024, img_1791709848921_y0zhg816.jpg)ImgOps Exif Google Yandex

7c0ad No.2304[Reply]

it's such a waste of resources to animate them on different properties when you could just use one. i'm tired of seeing people write out long lists for things that don't even need the extra complexity ⚠ performance logic.

transition:opacity 0.3s ease,transform 0.3s ease;

7c0ad No.2310

>>2304
>performance logic

I had a designer at my last gig who insisted on this exact mess for every single hover state in the nav. It made the codebase look like a total disaster and honestly, the way they were stacking properties felt so heavy. Just use all keyword if you're going to be lazy with it.

7c0ad No.2326

>>2304
>Just use all keyword if you're going to be lazy with it.
had a dev do this for a whole landing page once and the recalc style time was killing me on mobile because they were animating like twenty different properties individually

7c0ad No.2330

File: 1792062864744.jpg (215.18 KB, 1024x1024, img_1792062850088_vafgqksx.jpg)ImgOps Exif Google Yandex

>>2326
>the recalc style time was killing me on mobile
recalc style doesn't even touch those properties though. if you're animating opacity and transform you're already on the compositor thread so it shouldn't matter how many you list.



File: 1792041041360.jpg (133.16 KB, 1024x1024, img_1792041033039_82bh6rhg.jpg)ImgOps Exif Google Yandex

bddb5 No.2329[Reply]

another day of fixing broken animations because some dev thinks they're a motion designer. nothing beats the smooth janky mess of custom bezier curves that don't even match the system defaults.


File: 1791587650532.jpg (185.42 KB, 1024x1024, img_1791587642091_jmbree16.jpg)ImgOps Exif Google Yandex

9a6cd No.2296[Reply]

saw wired talking up css today and it's honestly pretty wild.
>built an experimental database-query engine entirely in css
cassidy williams is out here building query engines while i'm still struggling with basic centering. seeing people recreate doom or 3d pokemon cards makes me feel like i'm barely even using the language properly. anyone actually tried implementing a database logic like that?

found this here: https://chriscoyier.net/2026/10/09/justice-for-css/

9a6cd No.2319

>>2296
calling that a 'database-query engine' is such a stretch. it's just clever use of checkboxes and sibling selectors to toggle visibility for certain elements. anyone with a basic grasp of the
inputtype="checkbox":checked ~. data
logic can see it's just fancy state management, not actual data processing. why do people act like we've invented something new every time someone finds a way to use :has()?

9a6cd No.2328

>>2319 calling it fancy state management misses how much logic is actually being handled by the selectors. you'd expect a proper sql parser if we were talking real databases, but the way it mimics relational filtering is still pretty impressive tbh.



File: 1791838895848.jpg (223.64 KB, 1024x1024, img_1791838886758_towwu92n.jpg)ImgOps Exif Google Yandex

4447d No.2311[Reply]

was wrestling with some cards earlier that kept unevenly sizing because of content length. if you use flex-basis auto, it's a nightmare to get them perfectly uniform. i just switched everything to use this instead:
.card {flex: 1 1 0;}

it forces the browser to ignore the initial content size and treats every item as having the same starting point. spoilerworks like a charm for photo grids/spoaster

4447d No.2323

>>2311
>it forces the browser to ignore the initial content size

did this same thing on a dashboard build last month because the user names were all different lengths. it saved me from having to manually set widths for every single profile widget. was losing my mind

4447d No.2324

>>2311
>it forces the browser to ignore the initial content size

setting it to 0 breaks things if you have long words or huge images that need more room. i usually just use
min-width: 0
with auto instead so nothing gets squished weirdly. its much safer for responsive stuff.

4447d No.2327

File: 1791999245856.jpg (197.52 KB, 1024x1024, img_1791999230317_16ur8e0e.jpg)ImgOps Exif Google Yandex

>>2324
>i usually just usemin-width: 0with auto instead
just use
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))
for the grid container so you dont even have to mess with flex properties on the items.



File: 1791997894397.jpg (143.76 KB, 1024x1024, img_1791997886889_ri7cfkif.jpg)ImgOps Exif Google Yandex

2e83d No.2325[Reply]

finally getting rid of intersectionobserver for toc stuff is huge. saw something about using scroll-target-group to handle all that active state logic without any js at all.
>without a single line of JavaScript
idk if i trust the browser support yet but the idea of just using anchor links and some css pseudo-classes to highlight nav items sounds way cleaner than the old bootstrap way. its basically just overflow module level 5 stuff. feels like we can stop writing so much boilerplate for simple sidebars. wonder how it handles weirdly sized containers though. might be tricky if things overlap.

link: https://blog.master.dev/building-a-fancy-scrollspy-using-modern-css/


File: 1791961207215.jpg (219.78 KB, 1024x1024, img_1791961198748_isdmech7.jpg)ImgOps Exif Google Yandex

cd1da No.2322[Reply]

Still hate parsing strings manually just to add 20px to an element width. This new polyfill looks decent since it covers things like CSS. px() and handles the unit conversion without all that regex mess.
> const opacity = styles. getPropertyValue('opacity');
> console.log(typeof opacity); // String?
It's good that it includes the color subclasses too, but I'm curious if there's any major performance hit when it has to tokenize everything in the background.

https://www.bram.us/2026/10/13/introducing-css-typed-om-a-complete-and-wpt-tested-polyfill-for-css-typed-om/


Delete Post [ ]
Previous [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 ]