[ 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: 1790955981937.jpg (229.02 KB, 1024x1024, img_1790955972914_njal78ta.jpg)ImgOps Exif Google Yandex

083d6 No.2257

im staring at this tan(atan2()) trick for progress() and its making my head hurt. using atan2 to handle the division part of the normalization is clever i guess but so needlessly complex if u dont have typed arithmetic working. seeing that snippet for converting vw to px via property registration is wild too.
--vw {   syntax: "<length>";   initial-value: 100vw; }

it feels like way too much overhead just to get a unitless value. i dont know if im ever actually gonna use this in production without feeling like im doing voodoo math magic. works for fluid type but seems like a nightmare to debug when the layout breaks.

https://blog.master.dev/fallbacks-for-css-progress/

083d6 No.2269

File: 1791156466021.jpg (163.05 KB, 1024x1024, img_1791156449854_5gk4097i.jpg)ImgOps Exif Google Yandex

>>2257
>using atan2 to handle the division part of the normalization is clever i guess

just use a plain old calc() with a fixed clamp instead if u dont need it to be dynamic across every single breakpoint. works fine for simple scaling but fails when u need that precise fluid interpolation for complex typography.

083d6 No.2280

>>2257
>it feels like way too much overhead just to get a unitless value

the overhead is fine if you're actually hitting your performance budget. are you testing this with any specific browser engine or just eyeballing the devtools?

083d6 No.2286

>>2257
>it feels like way too much overhead just to get a unitless value

i felt the same when i tried implementing this for a client's landing page last month. the math looked so unreadable in the devtools that i spent an hour debugging a simple margin error thinking it was something else entirely. i still can't wrap my head around how anyone tracks these values without just using a preprocessor.



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