[whatwg] Styling form controls (Was: Re: Forms-related feedback)
dglazkov at chromium.org
Wed Dec 4 10:45:47 PST 2013
On Wed, Dec 4, 2013 at 10:30 AM, Ian Hickson <ian at hixie.ch> wrote:
> On Tue, 3 Dec 2013, Dimitri Glazkov wrote:
> > > >
> > > > Yeah, the idea is you'd bind to the scroll box to change the whole
> > > > scroll UI, but you could also then override specific pseudos of the
> > > > scroll box to style subparts of the default (or custom) scrollbox
> > > > UI. This part was never very well developed though since the core of
> > > > XBL2 was never picked up. But I think the same approach should
> > > > probably still work with the newer Web components work, no? It needs
> > > > to be specified and implemented...
> > >
> > > Web components can't define pseudo elements. So no.
> > >
> > > This sadly also means that you can't write a CSS which styles the
> > > default UA UI if that is used, and styles an attached Shadow DOM if
> > > that is used.
> > That's simply not true. Where'd you get that?
> > http://www.w3.org/TR/shadow-dom/#custom-pseudo-elements
> > http://robdodson.me/blog/2013/11/15/the-cat-and-the-hat-css-selectors/
> The key feature here isn't defining _new_ pseudo-elements, but being able
> to map specific elements in the shadow tree to predefined standard
> pseudo-elements, in particular, the same pseudo-elements that the standard
> binding exposes.
> If such a feature is available, then the HTML spec could list which of the
> standard pseudos each default binding is expected to expose, and then
> authors could style subparts of standard controls easily.
FWIW, I got push back on attempting to do this from both Apple and Mozilla
at the Shadow DOM CSS Meeting (
http://www.w3.org/wiki/Webapps/WebComponentsJune2013Meeting). The notes
don't do justice, unfortunately (
http://www.w3.org/2013/06/21-webapps-minutes.html (search for "SLIGHTLY
The gist of the argument was that we should let UAs decide how they want to
design controls and avoid limiting their options by standardizing behavior
More information about the whatwg