Web features explorer

:read-only and :read-write

Widely available since 2023-01-28
Tags: css Groups: HTML > Forms

The :read-only and :read-write CSS pseudo-classes match elements that are read-only or read-write, respectively. For example, :read-only matches <input> and <textarea> elements with the readonly attribute.

Learning resources on MDN

Browser support (view on caniuse.com)