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

Propose to group several CSS properties #26398

Closed
yarusome opened this issue Apr 25, 2023 · 4 comments
Closed

Propose to group several CSS properties #26398

yarusome opened this issue Apr 25, 2023 · 4 comments
Labels
Content:CSS Cascading Style Sheets docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.

Comments

@yarusome
Copy link
Contributor

MDN URL

https://developer.mozilla.org/en-US/docs/Web/CSS/initial-letter

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

Currently, initial-letter, initial-letter-align, object-fit, object-position, perspective, perspective-origin are listed separately.

What did you expect to see?

These properties be grouped like below:

initial-*
  • initial-letter
  • initial-letter-align
object-*
  • object-fit
  • object-position
perspective-*
  • perspective
  • perspective-origin

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

@yarusome yarusome added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Apr 25, 2023
@github-actions github-actions bot added the Content:CSS Cascading Style Sheets docs label Apr 25, 2023
@wbamberg
Copy link
Collaborator

This is set in the macro that builds the sidebar: https://github.com/mdn/yari/blob/8485e5d3c1e5ff83eceeefac394e0fc25f34abf0/kumascript/macros/CSSRef.ejs#L1055-L1070 - so you could change "3" to "2". But then we will get grouping for all groups of 2, not just the ones you listed (that is, we would collapse things like clip-, content-, hyphenate- etc).

I'm not sure if that's better or not, On the one hand it makes the sidebar shorter, on the other, any time someone needs to visit a page whose link is collapsed, there's an extra click needed. I think 3 was chosen (by me FWIW) with the intention of finding that balance. But I'm not certain it's the right balance :).

@yarusome
Copy link
Contributor Author

@wbamberg Extra clicking v.s. flooding the list does justify the non-collapsing of the properties mentioned here, but it seems to me that the collapse-by-number criterion could be improved (well, it should be another issue then).

Take the border-* group as an example: No one would expect that border-collapse, a property closely related to table elements, falls into (or effectively hides in) this group. And even for the rest border-* properties, the border-*-radius and border-image-* properties are somewhat different from others. So it would be better to have another depth of collapsing. (The mask-* group suffers the same problem to a less extent.)

@wbamberg
Copy link
Collaborator

Oh, do you mean like:

- border-*
    - border
    - border-block-*
        - border-block
        - border-block-color
        - ...
    - border-bottom-*
        - border-bottom
        - border-bottom-color
        - ...
   - ...

?

@yarusome
Copy link
Contributor Author

yarusome commented Apr 25, 2023

@wbamberg Yes, sort of. No matter what criterion is used to subgroup them (i.e. I haven't come up with a clear one), it'd be better than the monolithic status quo.


It seems that applying the same criterion as in the top group works good for this particular example as you show.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Content:CSS Cascading Style Sheets docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.
Projects
None yet
Development

No branches or pull requests

2 participants