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

enhance(sidebars/cssref): group CSS pseudo-classes #38019

Merged
merged 2 commits into from
Feb 9, 2025

Conversation

caugner
Copy link
Contributor

@caugner caugner commented Feb 7, 2025

Description

Groups the CSS Pseudo-classes in the sidebar, similar to the CSS Properties.

Motivation

Ensures especially that all the non-standard pseudo-classes are grouped together.

Additional details

Before After
image image
image image
image image

Related issues and pull requests

Fixes #38018.

@caugner caugner requested a review from a team as a code owner February 7, 2025 09:39
@github-actions github-actions bot added the size/xs [PR only] 0-5 LoC changed label Feb 7, 2025
@caugner caugner requested a review from estelle February 7, 2025 09:42
@bsmth
Copy link
Member

bsmth commented Feb 7, 2025

That's pretty neat. Question: is it possible to give a title to these or insert something before to indicate what the proceeding details element contains. Specifically :-* is ambiguous. For instance, it might be nice to have:

- Vendor-prefixed
  - :-a
  - :-b

or

- Non-standard
  - :-a
  - :-b

What do you think?

@Josh-Cena
Copy link
Member

This looks like a bug in Rari, because -moz-* properties show up as that, not -*. Rari should ignore the leading :- or - for the purpose of grouping, so it displays :-moz-*, not :-*.

@caugner
Copy link
Contributor Author

caugner commented Feb 7, 2025

This looks like a bug in Rari, because -moz-* properties show up as that, not -*. Rari should ignore the leading :- or - for the purpose of grouping, so it displays :-moz-*, not :-*.

Yes, it's interesting that rari isn't greedy and make :-moz- the group.

I would suggest to merge this as is, because it's already a sidebar UX improvement as is, and file a rari bug to enhance the grouping.

@caugner
Copy link
Contributor Author

caugner commented Feb 7, 2025

That's pretty neat. Question: is it possible to give a title to these or insert something before to indicate what the proceeding details element contains. Specifically :-* is ambiguous. For instance, it might be nice to have:

- Vendor-prefixed
  - :-a
  - :-b

or

- Non-standard
  - :-a
  - :-b

What do you think?

I'm pretty sure it's not possible with rari today, because complex includes and excludes in sidebar sections aren't supported, and my gut feeling is it's not worth the extra complexity at this point in time.

If we enhance the list grouping to properly group :-moz-*, then it would be consistent with CSS properties, and improving on top of that could be for a future iteration.

@caugner
Copy link
Contributor Author

caugner commented Feb 7, 2025

Filed issue: mdn/rari#127

Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks! 🎉

@Josh-Cena Josh-Cena merged commit fb25e90 into main Feb 9, 2025
10 checks passed
@Josh-Cena Josh-Cena deleted the 38018-group-css-pseudo-classes branch February 9, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/xs [PR only] 0-5 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove or condense non-standard prefixed pseudos from the side navigation
4 participants