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

[css-shadow-parts][css-pseudo] ::part* and *::before* and *::after* pseudo elements #3510

Closed
frivoal opened this issue Jan 14, 2019 · 4 comments
Labels
Closed Rejected as Invalid Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-pseudo-4 Current Work css-shadow-parts-1

Comments

@frivoal
Copy link
Collaborator

frivoal commented Jan 14, 2019

(Split from issue #3467, reported by @stefsullrew)

It appears the ::before and ::after pseudo elements/selectors do not function with ::part. Is this intentionally blocked, if so why? If not are there plans to add this functionality in the future?

// add an asterisk prefix to the title part
x-foo::part(title)::before {
    content: '*';
    color: red;
    margin-right: 0.25rem;
}
@lilles
Copy link
Member

lilles commented Jan 14, 2019

That sounds like a bug. Also, iterating more on that you should probably be able to say:

::slotted(component)::part(title)::before

but not (only possible if a slot element is exposed as a part):

part(title)::slotted(div)::before

@lilles
Copy link
Member

lilles commented Jan 14, 2019

For reference, the spec says ::before/::after is allowed after ::part: https://drafts.csswg.org/css-shadow-parts/#part

@fergald
Copy link
Contributor

fergald commented Jan 18, 2019

This was a chrome implementation issue that has now been fixed (along with ::placeholder). Web Platform tests have also been added for all 3.

@fergald fergald closed this as completed Jan 18, 2019
@frivoal frivoal added Closed Rejected as Invalid Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. labels Jan 18, 2019
@frivoal
Copy link
Collaborator Author

frivoal commented Jan 18, 2019

(marking as invalid + commenter satisfied as that this was not a spec bug, and that the implementation bug was resolved the way the commenter asked.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Rejected as Invalid Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-pseudo-4 Current Work css-shadow-parts-1
Projects
None yet
Development

No branches or pull requests

3 participants