Could someone please clarify why the CSS pseudo class :read-only
is being added to elements that are not actually readonly?
To see an example, check out this link
I have tested this in recent versions of Edge, Chrome, and Firefox. All of them apply the input:read-only
style to
<input type="button" />
According to W3Schools:
The :read-only selector targets elements that are technically "readonly". Form elements with a "readonly" attribute are considered as such.
On the other hand, MDN explains:
If an input has the readonly attribute, it will also be affected by the :read-only pseudo-class. Inputs that support the readonly attribute but do not have it set match the :read-write pseudo-class instead.