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

Add pseudo-class after ::part() #255

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from

Conversation

yisibl
Copy link
Contributor

@yisibl yisibl commented Aug 29, 2024

'::part(mypart):buffering',
'::part(mypart):stalled',
'::part(mypart):muted',
'::part(mypart):volume-locked',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbaron I noticed that these are not currently added to the tests in Blink Cl, are these valid?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in the spec for the selectors:
https://drafts.csswg.org/selectors-4/#sound-state

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I interpret them, :seeking, :buffering, :stalled, :muted, and :volume-locked fulfill the criteria for being placed after ::part(), as they match <audio> and <video> elements based on their local element information. (And David at least already added :paused and :playing.)

:current (and its functional notation), :future, and :past on the other side, not, because they are structural pseudo-classes, i.e. they match an element based on another element.

Copy link
Contributor Author

@yisibl yisibl Sep 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:future, and :past on the other side, not, because they are structural pseudo-classes, i.e. they match an element based on another element.

Can you go here and make a comment? w3c/csswg-drafts#10787

@yisibl
Copy link
Contributor Author

yisibl commented Sep 6, 2024

@LeaVerou PTAL

@SebastianZ
Copy link
Collaborator

I am not sure if we should test all of the pseudo-classes. Normally the tests only cover a few combinations. Though I don't have a strong opinion on that.

Regarding :xr-overlay, I realized we don't have any tests for WebXR yet. I guess we should add them as well. @yisibl Do you know of any other CSS features related to those specs?

Sebastian

@SebastianZ
Copy link
Collaborator

Regarding :xr-overlay, I realized we don't have any tests for WebXR yet. I guess we should add them as well.

Created #257 for that.

Sebastian

@yisibl
Copy link
Contributor Author

yisibl commented Sep 7, 2024

I am not sure if we should test all of the pseudo-classes. Normally the tests only cover a few combinations. Though I don't have a strong opinion on that.

What pseudo-classes are supported by ::part basically comes from the CSSWG discussions #10787 on the subject, and I'm sure these will eventually become part of the specification.

I think css3test should be as complete as possible in order for users to better understand the specification and test browser support. This is where css3test is more detailed than MDN and caniuse.com, and it's an advantage that we should keep.

I don't know anything about :xr-overlay either, just testing for support in the selector syntax here.

'::part(mypart):muted',
'::part(mypart):volume-locked',

// TODO: add pseudo-elements after ::part()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LeaVerou
Copy link
Owner

I don't have a strong opinion either. Given that not all pseudo-classes are allowed though, maybe testing all that should be allowed makes sense.

@yisibl
Copy link
Contributor Author

yisibl commented Sep 24, 2024

Let's merge this PR.

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

Successfully merging this pull request may close these issues.

4 participants