4 ms·
Currently, we generally use preprocessors such as LESS or Sass to compile from some more improved syntax into usable CSS2/CSS3 before serving (a la CoffeScript-
by BHSPitMonkey 14y ago
Currently, we generally use preprocessors such as LESS or Sass to compile from some more improved syntax into usable CSS2/CSS3 before serving (a la CoffeScript->JavaScript). A shim is generally meant to be there just in case some feature (present in some modern browsers) isn't available in the current browser; For this use case, that would be ALL browsers, and you'd just be adding page load time across the board (and further delaying when the page gets styled during rendering).
- lnanek2 14y agoIn this case, showing testimonials isn't core to most pages anyway, so no big deal if they fade in a second late. Heck, the animation might bring more attention to them. It's kind of bizarre reading hundreds of words from this author about this problem when he could have solved it 3 lines of JavaScript, checking the width of the element and swapping a class value.
- mistercow 14y ago>Currently, we generally use preprocessors such as LESS or Sass to compile from some more improved syntax into usable CSS2/CSS3 before serving (a la CoffeScript->JavaScript). Unfortunately, even for static CSS, that's not going to be practical for element queries. You could do it in theory, but in practice, you'd end up generating tons and tons of CSS for even very simple sites. >A shim is generally meant to be there just in case some feature (present in some modern browsers) isn't available in the current browser; That's why I put "shim-first" in quotes.