:read-only and :read-write
Widely available since 2023-01-28 (baseline high)
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.
Compatibility (view on caniuse.com)
- Chrome 1 Released on 2008-12-11
- Chrome Android 18 Released on 2012-06-27
- Edge 13 Released on 2015-11-12
- Firefox 78 Released on 2020-06-30
- Firefox for Android 79 Released on 2020-07-28
- Safari 4 Released on 2009-06-08
- Safari on iOS 3.2 Released on 2010-04-03