2 ms·
I'm not sure I agree with this particular approach, but I have been wondering lately if things would be simpler if styling was accomplished in a JS dialect inst
by cageface 14y ago
I'm not sure I agree with this particular approach, but I have been wondering lately if things would be simpler if styling was accomplished in a JS dialect instead of CSS. The popular CSS preprocessors are getting more and more like full-blown languages already so why not just do everything in JS anyway?
- ashearer 14y agoInterestingly enough, a JavaScript syntax for stylesheets was originally proposed by Netscape back in the early days: http://www.w3.org/Submission/1996/1/WD-jsss-960822 http://www.w3.org/Submission/1996/1/WD-jsss-960822 The declarative CSS syntax we know won out. (Netscape's CSS implementation remained tied to JavaScript anyway, a detail that was normally hidden, except when a JavaScript error also killed the remaining CSS on the page.)