4 ms·
I write a lot of CSS and I would probably disagree. CSS has no console.log() for debugging, CSS often fails silently, and the demos in the link are more or les
by bennettfeely 10y ago
I write a lot of CSS and I would probably disagree.
CSS has no console.log() for debugging, CSS often fails silently, and the demos in the link are more or less (albeit pretty neat) hacks, but don't use CSS features in the way the specifications intended.
- afarrell 10y agoAlso no unit tests and a program model that is hard to make into a coherent mental model.
- atmin 10y ago- CSS can be tested, e.g. [1] - use simplified program model and enforce it, [2] [1] https://github.com/jamesshore/quixote https://github.com/jamesshore/quixote [2] https://github.com/unframework/airtight-css-lint https://github.com/unframework/airtight-css-lint
- drinchev 10y agoMy reasoning is that CSS is not a language, it's just a configuration file. It doesn't have a console.log, but it has `background: red`. JS as a language and as such ( especially it's callback / event-driven nature ) makes it harder to debug.
- TimJYoung 10y agoYes, but with the browser debugger you can step through the JS code and visualize what it is doing. How can you visualize what is happening with CSS, short of debugging the internal browser code ?
- RodericDay 10y agoselect an element and see which rules are active on it?
- iamtyce 10y agoHuh? Linting and compilation pull up just about every problem in the writing of CSS. The rest are browser bugs / quirks.