Welcome to 2019, where CSS has evolved to become more powerful and flexible than ever. In this article, we'll delve into the latest CSS rules and features that have been gaining traction in the web development community. Let's dive right in!
CSS Grid and Flexbox: The Power Duo
In 2019, CSS Grid and Flexbox have become the go-to tools for creating responsive and dynamic layouts. While Flexbox is perfect for one-dimensional layouts and components, CSS Grid excels at two-dimensional layouts and page structures. Understanding and mastering these two technologies is crucial for any web developer in 2019.
- CSS Grid Complete Guide - CSS Tricks
- A Guide to Flexbox - CSS Tricks
Custom Properties (Variables)
Introduced in 2018 but gaining significant traction in 2019, CSS custom properties (variables) allow you to store values that can be reused throughout your stylesheet. This not only improves maintainability but also enhances performance by reducing the need for repeated declarations.

Here's a simple example of how to use CSS variables:
:root {
--primary-color: #1ea7fd;
--font-size: 16px;
}
body {
color: var(--primary-color);
font-size: var(--font-size);
}
CSS-in-JS Libraries
While not a CSS rule per se, CSS-in-JS libraries like styled-components and emotion have been making waves in the JavaScript community. These libraries allow you to write CSS directly in your JavaScript components, promoting code reuse and easier theming.
CSS Shapes and Shady DOM
CSS Shapes and Shady DOM are two lesser-known but powerful features that have started gaining traction in 2019. CSS Shapes allows you to create complex shapes using CSS, while Shady DOM provides a way to style and interact with the shadow DOM.

| Feature | Browser Support |
|---|---|
| CSS Shapes | 79.66% |
| Shady DOM | 87.24% |
While these features might not be as widely supported as others, they offer unique opportunities for creating innovative and complex user interfaces.
CSS Containment
CSS Containment is a set of properties that help optimize the rendering of web pages by providing a way to group elements and limit their impact on the layout and rendering of other elements. In 2019, CSS Containment has become an essential tool for web developers looking to improve performance and reduce layout thrashing.
That's a wrap on some of the most exciting CSS rules and features in 2019. Stay tuned for more updates and keep your skills sharp!






















