I'd like to extract the first paragraph from a custom element's content (as a summary). I would expect the following to work:
<polymer-element name="x-thing" noscript>
<template>
<segment class="summary">
<content select="p:first-child"></content>
</segment>
<segment>
<content></content>
</segment>
</template>
</polymer-element>
Unfortunately, the <content select="p:first-child">
doesn't appear to match anything :(
Here's a corresponding codepen.
Only :not()
is supported in the Shadow DOM spec: http://w3c.github.io/webcomponents/spec/shadow/#dfn-matching-criteria
Relevant bug: http://crbug.com/343332
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With