CKTIS / CSS
:read-write — user-editable elements
The :read-write pseudo-class selects elements whose contents the user can edit under HTML rules. It includes eligible form fields and editable content, but not every enabled control.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
:read-write:read-write is a pseudo-class without arguments. It matches elements that are user-editable under the document language's rules; using it in CSS does not itself enable editing.
In HTML, it includes mutable input elements of types to which readonly applies, and textarea elements without readonly that are not disabled. It also includes editing hosts and editable elements other than input and textarea, such as areas using contenteditable.
Do not equate it with :enabled or the absence of the [readonly] attribute: an enabled checkbox does not match :read-write. All other HTML elements match :read-only, including an ordinary non-editable paragraph.
In the example, .sample:read-write restricts selection to the demonstration elements. The expected result is editable, editor; the locked and disabled fields do not match. A green outline shows the same matching visually.
Examples
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>:read-write</title>
<style>
.sample:read-write { outline: 2px solid green; }
</style>
<input class="sample" id="editable" type="text" value="A">
<input class="sample" id="locked" type="text" value="B" readonly>
<input class="sample" id="disabled" type="text" value="C" disabled>
<div class="sample" id="editor" contenteditable="true">D</div>
<pre id="result"></pre>
<script>
const ids = [...document.querySelectorAll('.sample:read-write')]
.map(element => element.id);
document.getElementById('result').textContent = ids.join(', ');
</script>
</html>Result
editable, editor
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.