The State of CSS 2021 survey ran for the third year in a row, and reached over 8,000 developers worldwide. Let’s look at some of the results and how they map to plans browsers have for adding CSS features in 2022.
For some features, there’s a clear trend in usage and awareness year-over-year. CSS grid is an example of this.
Browser compatibility is a common pain point for web developers and, to learn more about what CSS features cause the most issues, the survey asked, “Are there any CSS features you have difficulties using because of differences between browsers?”
Survey results like these help guide prioritization for browser vendors. Many of the features are part of the Compat 2021 effort based on the MDN Browser Compatibility Report 2020, and others like subgrid are now being proposed as focus areas for Interop 2022.
The survey also asked, “Which feature would you most like to be able to use in CSS today?”
Container Queries was the overall “winner”, matching the 2020 results. Container queries enable component-based responsive design by allowing elements to query their parent selector for style changes. This is a much more local, specified scope than is currently possible with media queries.
Chrome is currently working on an experimental implementation, and funding the work of Miriam Suzanne, as she develops the specification in the CSS Working Group. You can try it out by going to
about:flags, searching for, and enabling, the Container Queries flag in Canary, or by using the container query polyfill. You can learn more about container queries, as well as see some demos that use them in the latest series of Designing in the Browser or trying them yourself here.
Please see the full report to learn more, see recommended resources, or dig into the data yourself.
Thanks to Sacha Greif for running the survey, and to the over 8,000 web developers who generously took the time to answer it.