Skip to content

[css-shadow-parts-1] 2.2 exportparts example doesn't match syntax specified #5504

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

Closed
chrisosaurus opened this issue Sep 10, 2020 · 2 comments

Comments

@chrisosaurus
Copy link
Contributor

chrisosaurus commented Sep 10, 2020

https://www.w3.org/TR/css-shadow-parts-1/#exportparts-attr
"2.2. Forwarding a Shadow Element: the exportparts attribute"
specifies the syntax for exportparts

The exportparts attribute is parsed as a comma-separated list of part mappings. Each part mapping is one of:

innerIdent : outerIdent
this adds «[ outerIdent → innerIdent ]» to el’s part name map.

ident
Is shorthand for ident : ident.

anything else
Ignored for error-recovery / future compatibility.

The example includes a snippet

<template id="c-e-outer-template">
  <c-e-inner exportparts="innerspan textspan"></c-e-inner>
</template>

Note the missing colon (:) from the exportparts attribute value.

(based on the comments within the example)
I think this snippet should contain an exportparts attribute value "innerspan : text" like so

<template id="c-e-outer-template">
  <c-e-inner exportparts="innerspan : textspan"></c-e-inner>
</template>
@tabatkins
Copy link
Member

tabatkins commented Sep 15, 2020

This was fixed a few years ago (8de4db2), we just haven't republished with the fix. ^_^ The ED (https://drafts.csswg.org/css-shadow-parts/) has the correct syntax in it.

@alice
Copy link

alice commented Nov 4, 2020

@tabatkins
Can we reopen this until the fixed version is published? I was tripped up by this for a good half an hour on Monday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants