Having
:read-only, [readonly] {
background-color: aliceblue;
}
<form>
<h2>test</h2>
</form>
Run codeHide resultHow can I detect, in case of debugging, for example, in Chrome, that the field h2(or form) has a property :read-only(or another type of selector, for example :disabled, etc.) before true?
PS.
To clarify the question: the question is not the CSS workaround for this particular case, but the way to define a specific element in devtools (F12 tools), if this element has or does not have some selectors, there :read-onlywas an example among others ...
source
share