---
title: "Modern CSS selectors"
url: https://daily.dev/posts/modern-css-selectors-0crla1mbq
source_url: https://blog.openreplay.com/modern-css-selectors
type: article
source: "asayer"
published: 2022-08-11T00:44:21.115Z
updated: 2022-08-11T00:44:21.114Z
tags: ["css"]
reading_time: 9
upvotes: 186
comments: 13
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Modern CSS selectors

**[asayer](https://daily.dev/sources/asayer)** · 9 min read · 186 upvotes · 13 comments

## Summary

This tutorial discusses three recent pseudo-class selectors which target elements based on their state. This creates identical CSS code and reduces typing effort and reduces Typing effort. The tutorial also reduces typing efforts and reduces writing effort. OpenReplay is an open-source, session replay suite that lets you see what users do on your web app. For more information, visit www.openreplay. www. Open Replay is a session replay. Click here for more information. Click HERE for more details.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.openreplay.com/modern-css-selectors>

## Community discussion

Top comments from developers on daily.dev.

**@fuadpashayev** · 4 upvotes

> Also some of old pseudo selectors are upgraded on level 4.
>
> e.g:  ":not()"
>
> /* old one */
> article :not(h2):not(h3):not(h4) {
>   margin-bottom: 1.5em;
> }
>
>
> /* new one */
> article :not(h2, h3, h4) {
>   margin-bottom: 1.5em;
> }

**@byv55f5f5** · 1 upvotes

> Good to know!

**@gabrielferrarir** · 0 upvotes

> Awesome!

**@riccardo\_manzan** · 0 upvotes

> I was waiting for so long for the `has` selector.  Unfortunately firefox does not support it even in an experimental way.

**@2kristian** · 0 upvotes

> Nice post :)

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 0 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments

---

Tags: [#css](https://daily.dev/tags/css)

[View this post on daily.dev](https://daily.dev/posts/modern-css-selectors-0crla1mbq)
