W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2017

Re: [csswg-drafts] [selectors] :read-only and :read-write

From: Matthew Raymond via GitHub <sysbot+gh@w3.org>
Date: Sat, 16 Dec 2017 12:17:12 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-352179898-1513426631-sysbot+gh@w3.org>
Well, these pseudo-classes were originally created for [XForms 1.1](https://www.w3.org/TR/xforms/#style):

> Selects any core form control **bound to a node with the model item property readonly** evaluating to true or false (respectively).

So the whole point wasn't that the element was interactive, but that it was bound to a node in the data model that had the property of being read-only. Read-only is a property of the underlying data model, not the control.

In HTML, the control elements have an implicit data model, but nothing has changed. The "readonly" attribute applies only to Web Forms elements. The other elements don't have an implicit data model. Thus, it's my feeling that :read-only should only apply to controls that are specifically set with the"readonly" attribute, and :read-write should match all controls that aren't "readonly". If we need a pseudo-class for editable elements, use something like :editable or :mutable instead of :read-write. We should never have a situation where :read-write is just :not(:read-only) or vice versa.

-- 
GitHub Notification of comment by MatthewRaymond
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/127#issuecomment-352179898 using your GitHub account
Received on Saturday, 16 December 2017 12:17:15 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:26:44 UTC