Chapter 3. Optimizing CSS

This chapter covers

  • Reducing the size of your CSS by taking advantage of shorthand CSS properties, using shallow CSS selectors, and implementing the DRY principle
  • Segmenting your CSS by using unique page templates
  • Understanding the importance of mobile-first responsive web design
  • Knowing what makes a page mobile-friendly, and how this matters to Google search rankings
  • Improving the performance of your CSS by avoiding bad practices and using higher-performing CSS selectors, the flexbox layout engine, and CSS transitions

Now that you’ve learned how to assess performance by using developer tools available in the browser, you can learn to optimize the various aspects of your websites. This starts with optimizing ...

Get Web Performance in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.