[ 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: 1791507938847.jpg (188.52 KB, 1024x1024, img_1791507929984_0x4xdjh0.jpg)ImgOps Exif Google Yandex

a9781 No.2289

was trying to dynamically build a class name using a loop but forgot that you can't just drop the variable in there without the #{} syntax. it's so easy to mess up when you're rushing through a stylesheet. honestly just use css variables if you don't want to deal with this nonsense
.theme-#{$color} {background: $color;}

tbh the compiler errors are way too vague about where the interpolation failed

a9781 No.2307

>>2289
>just use css variables if you don't want to deal with this nonsense

I spent two hours debugging a broken grid layout on a client project last week because I missed that exact syntax in a nested loop. Everything looked fine until the build failed and gave me some garbage error about an undefined property. It's such a total time sink when you're just trying to finish a quick component.
I ended up deleting the whole scss file and rewriting it in plain css

a9781 No.2309

File: 1791797242196.jpg (194.9 KB, 1024x1024, img_1791797227363_7s7amul0.jpg)ImgOps Exif Google Yandex

>>2307
>Everything looked fine until the build failed and gave me a garbage error about an undefined property.

sass errors are basically just vague riddles __designed to ruin your afternoon_

a9781 No.2318

File: 1791927487169.jpg (168.25 KB, 1024x1024, img_1791927471611_tfhmk5u4.jpg)ImgOps Exif Google Yandex

>>2309
They really are. I still find myself staring at a screen for ten minutes wondering why my loop is suddenly broken.



[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 ]