Earlier quoted context omitted.
I was recently doing some very specific web scraping of some very public very static documents. About 25% of them use a soup of divs with hashes for class names. Not a or or in sight. I am fine with the idea of what tailwind does but like at least using semantic tags where appropriate could be a thing.
Wait until sites start rendering to canvas. You will yearn for the days of div soup.
Modern CSS Code Snippets: Stop writing CSS like it's 2015
231–240 of 318 posts
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#232Earlier quoted context omitted.
Vue, Svelte, and Surface manage to do this without forcing you to inline all your styles
Jumping up and down in the file is not much better and you still need to come up with names for classes. I want to look at an element and immediately know how it's styled.
[...]
"immediately" is a stretch
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#233Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#234Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#235Earlier quoted context omitted.
Cognitive load of looking at 12 open files trying to understand what’s happening. Well, in fairness some of those 12 are the same file because we have one part for the default CSS and then one for the media query that’s 900 lines further down the file.
Css modules gets away from the larger sins of the massive global css files. If modules had existed much earlier it probably would’ve gotten rid of most of the awfulness.
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#236Earlier quoted context omitted.
Yeah a lot of these demos say the features are widely available, but they don't actually work in my browser (Firefox on Macos). Makes me wonder if these demos (or the browser support tables) were made by LLMs. They clearly haven't tested the demos in firefox.
Firefox is pretty irrelevant nowadays. They've dragged their feet for years when it comes to implementing new stuff, and now web devs don't even bother checking Firefox. Because devs know it won't work on ancient browsers, no need to confirm. My personal trigger events were when Firefox didn't optimize DataView for the longest time, initially refused to implement import maps, and couldn't get WebGPU support done. At…
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#237Earlier quoted context omitted.
Yeah a lot of these demos say the features are widely available, but they don't actually work in my browser (Firefox on Macos). Makes me wonder if these demos (or the browser support tables) were made by LLMs. They clearly haven't tested the demos in firefox.
Firefox is pretty irrelevant nowadays. They've dragged their feet for years when it comes to implementing new stuff, and now web devs don't even bother checking Firefox. Because devs know it won't work on ancient browsers, no need to confirm. My personal trigger events were when Firefox didn't optimize DataView for the longest time, initially refused to implement import maps, and couldn't get WebGPU support done. At…
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#238Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#239I dislike the examples here where the "old" way works in all browsers, but the "new" way only works in Chrome/Edge. IMO, it's irresponsible to include such examples, since it makes the Blink monoculture worse.
This site shouldn't be the one to blame. Instead, we should probably ask Mozilla to be more standards-compliant.
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#240CSS in 2025: Let's write html inlined styles as if it was 2005 and separation of formatting/representation was never invented. I talk of tailwind, of course.
The deadest horse in web development is the myth of “separation of concerns”
If we are talking about statically defined html then sure. make your global css files.