- From: Lea Verou via GitHub <sysbot+gh@w3.org>
- Date: Sat, 15 Jun 2024 14:24:30 +0000
- To: public-css-archive@w3.org
> ```css > #foo { > height: 1px; > block-size: 2px; > height: var(--invalid) !revertable; > } > ``` > > Assuming an horizontal writing mode, should this revert to 2px or 1px? I guess 2px like `revert-layer` would do in different layers, but it seems extra annoying for CSSOM. > > I wonder if it would make more sense to add an entirely new rule like > > ```css > @revertable #foo { > height: 1px; > block-size: 2px; > height: var(--invalid); > } > ``` This seems orthogonal to the issue we’re discussing? It would revert to whatever this would revert to: > ```css > #foo { > height: 1px; > block-size: 2px; > height: var(--invalid) !revertable; > } > ``` > > Assuming an horizontal writing mode, should this revert to 2px or 1px? I guess 2px like `revert-layer` would do in different layers, but it seems extra annoying for CSSOM. Not sure how UAs handle the aliasing, but that doesn't seem particularly difficult to define. > > I wonder if it would make more sense to add an entirely new rule like > > ```css > @revertable #foo { > height: 1px; > block-size: 2px; > height: yolo; > } > ``` I would be *strongly* opposed to doing this as a rule. Rules are far more heavyweight, scoping has to be defined from scratch, and authors cannot port knowledge about it from other parts of CSS. @-rules should be a last resort, not the first thing we reach for because defining syntax with better ergonomics is harder. -- GitHub Notification of comment by LeaVerou Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10443#issuecomment-2169767998 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 15 June 2024 14:24:30 UTC