The :read-write pseudo-class matches elements the user can edit — typically input / textarea without readonly (and not disabled), plus contenteditable content.
Pair it with :read-only when a form mixes locked confirmation fields and still-editable ones (for example delivery instructions).
Baseline — widely available.
Supported across modern browsers (MDN: widely available since July 2020). Prefer scoped selectors such as textarea:read-write when you only want form controls.
Scope carefully if you do not want every paragraph styled.
Edge Cases & Pitfalls
Editable state is the key — disabled and readonly never match.
disabled
Disabled is not read-write
A disabled control cannot be edited. Style it with :disabled, not :read-write.
readonly
readonly flips to :read-only
As soon as you add readonly, :read-write stops matching. Use that toggle for confirmation steps.
scope
Not only form controls
contenteditable nodes also match. Prefer input:read-write / textarea:read-write for forms.
a11y
Keep focus styles
A decorative outline for :read-write should not replace a clear :focus / :focus-visible indicator.
Compatibility
Browser Support
:read-write is a browser CSS pseudo-class. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
:read-write
Widely available across modern browsers (MDN notes broad support from mid-2020). Pair with :read-only for form UX. Internet Explorer had incomplete / prefixed support historically.
97%Widely available
Google ChromeSupported
Full support
Mozilla FirefoxSupported
Full support
Apple SafariSupported
Full support
Microsoft EdgeSupported
Full support
OperaSupported
Full support
Samsung InternetSupported
Full support
Internet ExplorerPartial
Legacy / incomplete
:read-writeBaseline · Widely available
Bottom line: Safe for modern form styling. Scope to input/textarea when needed. This is not a JavaScript runtime API.
Remember
Key Takeaways
Role: style elements the user can edit.
Pair with :read-only for locked vs editable fields.
Start simple:textarea:read-write { outline: …; }.
Excluded:readonly and disabled never match.
One line::read-write paints “you can type here” — highlight it, and mute the rest with :read-only.
Frequently Asked Questions
It matches elements the user can edit — typically input and textarea without readonly (and not disabled), plus contenteditable elements.
:read-write matches editable controls. :read-only matches non-editable ones. They are natural pairs for confirmation vs editable fields in the same form.
No. Disabled controls are not editable. Use :disabled for inactive fields and :read-write only for controls users can type into.
Yes. Any user-editable element can match, such as a paragraph with contenteditable. Scope your selector if you only want form controls.
No. It is a browser CSS pseudo-class. Node.js, Deno, and Bun do not apply it.