[whatwg] Styling form controls (Was: Re: Forms-related feedback)
Dimitri Glazkov
dglazkov at chromium.org
Wed Dec 4 09:45:53 PST 2013
On Tue, Dec 3, 2013 at 10:32 PM, Jonas Sicking <jonas at sicking.cc> wrote:
> On Dec 3, 2013 9:39 PM, "Dimitri Glazkov" <dglazkov at chromium.org> wrote:
>
> >> 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
>
> Ah, I thought that the cat and hat combinators had replaced pseudo element
> support. Glad to see that is not the case.
>
That will probably still happen, at least in the scope of shadow DOM.
Cat/hat are a much better replacement. See my (longish) explanation of the
problem with custom pseudo elements here:
http://lists.w3.org/Archives/Public/public-webapps/2013JulSep/0454.html
> However as the spec is currently written the author still couldn't write a
> replacement for <select> which supports a ::options-box pseudo element (if
> that is what we agree it should be called and what the UA UI should respond
> to.)
>
Yup. That's something that needs to be figured out.
I wonder if the right approach is to explaining pseudo elements is to treat
them as something that may rely on Shadow DOM, but is a different beast
altogether, because they have some rather interesting quirks (look at
::backdrop, for instance).
:DG<
More information about the whatwg
mailing list