:read-write

  • Revision slug: CSS/:read-write
  • Revision title: :read-write
  • Revision id: 313761
  • Created:
  • Creator: ethertank
  • Is current revision? No
  • Comment

Revision Content

{{ CSSRef() }}

Summary

The :read-write CSS pseudo-class matches when an element is editable by user like text input element.

Example

input:-moz-read-write { background: #eee; }
input:read-write { background: #eee; }

Specifications

Specification Status Comment
{{ SpecName('HTML WHATWG', '#selector-read-write', ':read-write') }} {{ Spec2('HTML WHATWG') }} No change.
{{ SpecName('HTML5 W3C', '#selector-read-write', ':read-write') }} {{ Spec2('HTML5 W3C') }} Defines the semantic regarding HTML and constraint validation.
{{ SpecName('CSS4 Selectors', '#rw-pseudos', ':read-write') }} {{ Spec2('CSS4 Selectors') }} No change.
{{ SpecName('CSS3 UI', '#pseudo-ro-rw', ':read-write') }} {{ Spec2('CSS3 UI') }} Defines the pseudo-class, but not the associated semantic.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }}{{ property_prefix("-moz") }}{{ bug("312971") }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatVersionUnknown() }}
Editable element (except to text input fields) {{ CompatNo() }} {{ CompatVersionUnknown() }}{{ property_prefix("-moz") }}{{ bug("312971") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatVersionUnknown() }}{{ property_prefix("-moz") }}{{ bug("312971") }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}
Editable element (except to text input fields) {{ CompatNo() }} {{ CompatNo() }} {{ CompatVersionUnknown() }}{{ property_prefix("-moz") }}{{ bug("312971") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}

See also

Revision Source

<div>
  {{ CSSRef() }}</div>
<h2 id="Summary" name="Summary">Summary</h2>
<p>The <code>:read-write</code> CSS <a href="/en-US/docs/CSS/Pseudo-classes" title="Pseudo-classes">pseudo-class</a> matches when an element is editable by user like text input element.</p>
<h2 id="Example" name="Example">Example</h2>

<div style="overflow:hidden">
<pre class="brush:css">
input:-moz-read-write { background: #eee; }
input:read-write { background: #eee; }
</pre>
</div>

<h2 class="editable" id="Specifications" name="Specifications">Specifications</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{ SpecName('HTML WHATWG', '#selector-read-write', ':read-write') }}</td>
      <td>{{ Spec2('HTML WHATWG') }}</td>
      <td>No change.</td>
    </tr>
    <tr>
      <td>{{ SpecName('HTML5 W3C', '#selector-read-write', ':read-write') }}</td>
      <td>{{ Spec2('HTML5 W3C') }}</td>
      <td>Defines the semantic regarding HTML and constraint validation.</td>
    </tr>
    <tr>
      <td>{{ SpecName('CSS4 Selectors', '#rw-pseudos', ':read-write') }}</td>
      <td>{{ Spec2('CSS4 Selectors') }}</td>
      <td>No change.</td>
    </tr>
    <tr>
      <td>{{ SpecName('CSS3 UI', '#pseudo-ro-rw', ':read-write') }}</td>
      <td>{{ Spec2('CSS3 UI') }}</td>
      <td>Defines the pseudo-class, but not the associated semantic.</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility" name="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatVersionUnknown() }}</td>
        <td>{{ CompatVersionUnknown() }}{{ property_prefix("-moz") }}{{ bug("312971") }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatVersionUnknown() }}</td>
      </tr>
      <tr>
        <td>Editable element (except to text input fields)</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatVersionUnknown() }}{{ property_prefix("-moz") }}{{ bug("312971") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Chrome for Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Mobile</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatVersionUnknown() }}{{ property_prefix("-moz") }}{{ bug("312971") }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
      </tr>
      <tr>
        <td>Editable element (except to text input fields)</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatVersionUnknown() }}{{ property_prefix("-moz") }}{{ bug("312971") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also" name="See_also">See also</h2>
<ul>
  <li>HTML <a href="/en-US/docs/HTML/Content_Editable" title="HTML/Content Editable"><code>contenteditable</code></a> attribute</li>
</ul>
Revert to this revision