Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pseudo-classes in <content> select attribute #470

Closed
tomalec opened this issue Apr 10, 2014 · 6 comments
Closed

Pseudo-classes in <content> select attribute #470

tomalec opened this issue Apr 10, 2014 · 6 comments

Comments

@tomalec
Copy link
Contributor

tomalec commented Apr 10, 2014

I'm trying to wrap Custom Element's child nodes (from light DOM) in its ShadowDOM.
Therefore I use pseudo-class :nth-child selector:

    <polymer-element name="my-list" noscript>
        <template>
            <ul id="container">
                <li><content select=":first-child"></content></li>
                <li><content select=":nth-child(2)"></content></li>
            </ul>
            <content></content>
        </template>
    </polymer-element>

http://jsfiddle.net/tomalec/f7bn5/3/

It works fine in stable Chrome, and Firefox, but it does not work on Canary (36.0.1932.2 enable-experimental-web-platform-features).

Am I doing it wrong, or is this a bug with Canary?

@dglazkov
Copy link

My apologies. I think this should totally work, and this is something we had implemented in Chrome, but it was taken out of the spec based on objections from other vendors: https://www.w3.org/Bugs/Public/show_bug.cgi?id=24872#c9. So we removed pseudoclass support to conform to the spec. We're going to discuss this at the W3C meeting tomorrow and see if we can bring it (or perhaps even better alternatives) back.

@tomalec
Copy link
Contributor Author

tomalec commented May 2, 2014

Hi, do you have any news on this?

@mysticatea
Copy link

+1

@roberthartung
Copy link

+1 - I really would like to see this! Any news on this?

@robdodson
Copy link
Contributor

Support for :not has been added
https://code.google.com/p/chromium/issues/detail?id=370670

It's a start 😸

@sorvell
Copy link
Contributor

sorvell commented Aug 12, 2014

Closing since this is a spec issue. Please add feedback to the spec issue here:

https://www.w3.org/Bugs/Public/show_bug.cgi?id=24872

@sorvell sorvell closed this as completed Aug 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants