Bad article that doesn't really give any counter arguments. The author almost sounds sarcastic when talking about the outputted CSS from JS.
.heading_1flg42u-o_O-callout_1ih983s {
font-family: Comic Sans MS !important;
color: tomato !important;
}
See? Still CSS. Clean CSS. Perfect CSS. To-the-book CSS.
Using !important is not perfect CSS nor clean. The nature of CSS is that it cascades. The CSS in JS solution the author proposes pretty much gets rid of the cascade nature of it
This article gives a good argument for CSS and describes that it is not broken and you don't need to put it in your JS.
3
u/lamb_pudding Mar 30 '17
Bad article that doesn't really give any counter arguments. The author almost sounds sarcastic when talking about the outputted CSS from JS.
Using
!importantis not perfect CSS nor clean. The nature of CSS is that it cascades. The CSS in JS solution the author proposes pretty much gets rid of the cascade nature of itThis article gives a good argument for CSS and describes that it is not broken and you don't need to put it in your JS.