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-gaps-1] Naming bi-directional gap decoration shorthand #11495

Open
kbabbitt opened this issue Jan 13, 2025 · 2 comments
Open

[css-gaps-1] Naming bi-directional gap decoration shorthand #11495

kbabbitt opened this issue Jan 13, 2025 · 2 comments

Comments

@kbabbitt
Copy link
Collaborator

kbabbitt commented Jan 13, 2025

Gaps 1 defines the gap-rule property as a shorthand which sets widths, styles, and colors in both the row and column directions.

In the TAG review thread for CSS Gap Decorations, @LeaVerou asked:

Why gap-rule and not just rule which would be consistent with the row-gap/column-gap/gap shorthand?

To which I responded:

I was a little concerned about overloading a general term like "rule" in case we at some point discover some other place we want to paint rules, and to avoid confusion between a CSS rule and the CSS rule property.

I wanted to open a discussion to get more opinions from the WG about this. What do folks think?

@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed [css-gaps-1] Naming bi-directional gap decoration shorthand, and agreed to the following:

  • RESOLVED: rename gap-rule to 'rule'
The full IRC log of that discussion <TabAtkins> kbabbitt: this came up in TAG review for gap decos
<TabAtkins> kbabbitt: there's a gap-rule shorthand that sets width/style/color for both directions
<TabAtkins> kbabbitt: named it gap-rule for a few reasons
<TabAtkins> kbabbitt: first, nervous about taking rule-* for future
<lea> q+
<TabAtkins> kbabbitt: also avoiding confusion between the "rule" properties and CSS rules
<TabAtkins> kbabbitt: just wanted some opinions
<TabAtkins> lea: this is what we do for gap - row-gap/column-gap, and gap
<TabAtkins> lea: so suggested doing the same and getting just 'rule'
<TabAtkins> lea: but you raise valid points
<TabAtkins> astearns: i'm usually very concerned about consistency, but not concerned in this case. i do like the guarding considerations.
<TabAtkins> TabAtkins: same
<TabAtkins> TabAtkins: so proposed resolution is stick with gap-rule?
<TabAtkins> fantasai: feels like it should be a longhand of 'gap' then, so i'm leanign the other way
<TabAtkins> kbabbitt: could it be? could get ambiguous, a length could be the gap size or the rule size
<TabAtkins> grule
<TabAtkins> florian: the confusion between decorative and syntactic rules is unlikely to anywhere besides these meetings, so it's fine
<TabAtkins> florian: and context is different enough anyway, not very confusing
<TabAtkins> fantasai: oh so i'm not suggesting `gap` be a shorthand that includes gap-rule, i suggest just doing 'rule'
<TabAtkins> astearns: so proposed resolution, rename gap-rule to 'rule'
<TabAtkins> RESOLVED: rename gap-rule to 'rule'

@kbabbitt
Copy link
Collaborator Author

kbabbitt commented Feb 1, 2025

One note: Currently, the spec also has gap-rule-width, gap-rule-style, and gap-rule-color shorthands. For consistency I would interpret the WG resolution as intended to apply to these shorthands as well, i.e. rename them to rule-width, rule-style, and rule-color respectively. If there are concerns with this, please leave a note.

edit: and gap-rule break, gap-rule-outset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Friday afternoon
Development

No branches or pull requests

2 participants