[ 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.)

File: 1793929834770.jpg (149.28 KB, 1024x878, img_1793929825193_7kjs4zzi.jpg)ImgOps Exif Google Yandex

06649 No.2439

been messing around with a nested loop to spit out utility classes for a custom grid system. it works okay for simple stuff but i keep running into issues when i try to target specific column spans without creating a massive, bloated stylesheet. tried using an @each loop with a list of numbers, but the output is just way too much junk for the final build. i was thinking about using a map instead to limit the scope but now the syntax is getting super confusing.
@for $i from 1 through 12 {.col-span-#{$i} {grid-column: span #{$i} / span #{$i};}}

it's making my compiled css file look like a total mess. also just found this cool trick with CSS variables for theme colors while fixing this, so that was a nice little win.


[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]