O'Reilly logo

Pro CSS for High Traffic Websites by Inayaili de León, Antony Kennedy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Dynamic CSS

Up until now, this book has considered CSS files to be static assets. That is, what is requested from the server and delivered to visitors of your site is exactly the same in every instance. Although this is almost always the expected behavior and most performant way to implement CSS, it is possible to tailor the output of our CSS dependent on other factors and deliver different CSS to different users.

There are several reasons you might like to do this, some for the benefit of developers and some for the benefit of users. From the developer's perspective, it can be useful to use variables[84] or to dynamically populate CSS. For any repetitive code, such as colors or particular blocks of CSS, storing this once and maintaining ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required