Re: [css3-ui] Pseudo elements

> On 05 Jan 2015, at 21:40, Florian Rivoal <florian@rivoal.net> wrote:
> 
> Hi Tantek,
> 
> Thanks for making the edit removing pseudo elements from css3-ui. I noticed that you kept the ::value and ::choices pseudo elements, citing applicability to HTML and mozilla's intent to implement[1].
> 
> For ::value, I agree it is is relevant for HTML, and even though the mozilla bug is pretty old, at least it shows some interest. At the same time, one intent to implement falls short of 2 implementations. I think you were right to keep it instead of deleting it, but I suggest moving it to the css-pseudo spec. It is a (the?) good home for pseudo elements, and isn't nearly as close as css-ui to trying to pass the CR exit criteria, so the lack of implementations isn't problematic. While we're at it, we should probably clarify if ::value, in combination with :placeholder-shown[2], can be used to style the placeholder, or it if only applies to the non placeholder value. I'd favour making :placeholder-shown::value select the placeholder.
> 
> ::choices should probably be moved to css-pseudo as well if we decide to keep it, but I am more sceptical that we should. I don't know how much weight to put behind mozilla's intent to implement here, as it is a single comment, by you, in the bug about ::value. Also, the spec currently does not say which properties would apply in this pseudo. Finally, the second paragraph sounds a bit strange to me: radio buttons have actual elements that can be already be selected, so I am not sure why we'd need the pseudo to match them as well. Moreover, given that we have a :checked pseudo class [3] for the selected radio button, I don't think we should overload ::value to do this; the semantics are not a perfect match anyway, and this should really be done by a pseudo class, not a pseudo element. All in all, this seems like an underspecified feature with very limited interest from implementors; and I'd say it probably belongs in the wiki.

Following on the telecon discussion, ::placehoder has been added to css-pseudos[4]. With this is place, how useful is the ::value pseudo? It is no longer needed to solve the :placeholder-shown::value use case. When the input element is a text field (possibly constrained by type=email and the like), I don't see what the ''input::value'' selector enables that can't be done with ''input''.

It seems it could have a role to play (which is also true for ::choices) when a form element is a composite control with multiple parts, such as a dropdown where you might want to style the currently selected value differently from the list of things you can pick from, or a date picker where you might want to style the textual selected date differently from the calendar displayed to help you pick the date. However, even in such cases, I am not convinced ::value and ::choices are the right tools for the job, as we don't know what these complex input elements are made of, and therefore can't say much about what ::value and ::choices would modify, which property is reasonable to allow, etc. It seems to me that this is the type of things that should be handled via web components / shadow dom.

- Florian

> [1] https://bugzilla.mozilla.org/show_bug.cgi?id=648643
> [2] http://dev.w3.org/csswg/selectors/#placeholder-shown-pseudo
> [3] http://dev.w3.org/csswg/selectors/#checked

[4] http://dev.w3.org/csswg/css-pseudo/#placeholder-pseudo

Received on Thursday, 15 January 2015 16:33:00 UTC