Re: [w3c/webcomponents] Add custom states and :state() pseudo class proposal (#832)

domenic commented on this pull request.



> @@ -0,0 +1,105 @@
+# `ElementInternals.states` and the `:state()` pseudo class
+
+Author: @rakina, @domenic
+
+## Introduction
+
+Built-in elements have certain “states” that can change over time depending on user interaction and other factors, and are exposed to web authors through pseudo classes. For example, some form controls have the “invalid” state, which is exposed through the `:invalid` pseudo class.
+
+Like built-in elements, custom elements can have various states to be in too, and web authors might want to expose these states in a similar fashion as the built-in elements. With the proposed `ElementInternals.state`  property, custom element authors can add and modify custom states for the custom elements, and allow them to be selected with the `:state()` selector.

In general avoid `ClassName.propertyName` syntax unless you are specifically talking about a static property. Use "`state` property of `ElementInternals`" or "`elementInternals.state`" or similar.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/pull/832#pullrequestreview-283054854

Received on Tuesday, 3 September 2019 14:54:33 UTC