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

Consider using :current (+ :past & :future) instead of :checked for markers #28

Open
Schepp opened this issue Jul 12, 2024 · 2 comments

Comments

@Schepp
Copy link

Schepp commented Jul 12, 2024

I find the use of the :checked pseudo class not to be the ideal choice for something that is not a checkbox or switch. Instead what we wanna mimick in CSS is HTML's aria-current-attribute. This is best done via the existing :current pseudo class, which is currently used for video VTTs and already offers a way to mark the active element in a sequential row of elements. For markers that are located before and after the active marker, we could then also use the closely related :past and :future pseudo classes.

@tabatkins
Copy link

I don't think I agree with trying to repurpose the temporal pseudo-classes like this. They already have a meaning, independent of what you're proposing, which means that theoretically both sets of meanings could apply and be extremely confusing.

I agree that using :checked isn't ideal. The naming isn't great for the intended meaning, and in theory it runs into the same issue as above, but in practice I think they don't actually overlap in applicability.

If we don't like :checked, we can just invent a new word. No reason to be spendthrift here.

@yisibl
Copy link

yisibl commented Aug 29, 2024

In Customizable Select Element, :checked is used to represent the checked value, and we should keep the API consistent here if there is no particular reason to do so.

openui/open-ui#827 (comment)

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

3 participants