w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.46k stars 657 forks source link

[css-anchor-position] Initial value of `position-anchor` should be `auto` not `implicit` #10312

Closed fantasai closed 1 month ago

fantasai commented 4 months ago

The syntax of position-anchor is <dashed-ident> | implicit with the initial value being implicit. “Implicit” is a great spec word, but it is fairly advanced vocabulary and not a term we have put into the authoring syntax space before. The typical keyword for this kind of thing in CSS is auto. We should rename it to auto.

mfreed7 commented 4 months ago

This is a reasonable point. +1 to renaming implicit to auto. Let’s get a resolution on Wednesday if possible. Chromium is happy to ship this change, ASAP.

css-meeting-bot commented 4 months ago

The CSS Working Group just discussed [css-anchor-position] Initial value of `position-anchor` should be `auto` not `implicit`, and agreed to the following:

The full IRC log of that discussion <bradk> present*
<emilio> fantasai: The initial value of `position-anchor` is `implicit`
<emilio> ... advanced vocabulary, but we probably don't want to expose this to authors
<emilio> ... propose to rename `implicit` to `auto`
<emilio> ... and then this keyword also shows up in `anchor()` where we can rename it to `auto` too or just drop it because I don't think it's necessary
<emilio> TabAtkins: we should just drop it, if you omit it you get that behavior
<emilio> ... I generally want to make sure that implicit behavior is specifiable, but not necessary
<emilio> florian: seems more consistent to how we name things
<emilio> RESOLVED: Rename implicit to auto in position-anchor
<emilio> RESOLVED: Drop the keyword from the anchor() function
yisibl commented 4 months ago

Is the implicit value also removed from anchor-size()?

Until then, anchor-size(implicit width) is a legal value.

astearns commented 4 months ago

@yisibl the syntax change looks right to me (see the change in the <anchor-element> component definition)

But there are still several prose references to an implicit keyword that should be removed (in 2.1.1 and 2.3)

yisibl commented 4 months ago

@astearns So after the syntax change, will anchor-size(implicit width) become anchor-size(width) ?

astearns commented 4 months ago

@yisibl that is my reading. @tabatkins are we correct?

tabatkins commented 4 months ago

Correct. The reduced version is already correct syntax with that meaning, it just will no longer be valid to write the implicit keyword explicitly.