« Oatmeal

In reply to: Decide how to distribute/manage CSS · Issue #40 · codemirror/codemirror.next · GitHub

This thread of the codemirror.next issues cogently lays out some of the issues with moving CSS into JS.

I write CSS. I write JS. I get that it is sometimes useful to move CSS into JS, but for code that is going to be touched by lots of people I think it is best to keep them separate.

One reason I see folks reference for keeping them separate is that by doing so you don’t raise the point of entry” for those who don’t know JS, but do know CSS.

I think this is true, but also weirdly demeaning and HUGELY undervalues the complexity, power, and importance of CSS in a project.

Keeping CSS separate from JS helps to ensure that CSS doesn’t become an after thought…just icing. CSS that is an afterthought is CSS that is difficult to, or straight up impossible to maintain. CSS that is an afterthought means that the user interface and interaction model will suffer.


Post a response on your own site? Send me a webmention!