-
Notifications
You must be signed in to change notification settings - Fork 677
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-view-transitions-1] Disallow the name auto
as view-transition-name
#9639
Comments
Yup, sounds good to me. |
I'm not sure if we'll have to use `auto for #8319, but I'm fine with disallowing it as a vt name. |
Agenda+’ing this. The sooner we do this, the better. |
The CSS Working Group just discussed
The full IRC log of that discussion<frances__> bramus: right now the property transition view name accepts custom in #8319, might be feasible to add alternate shorthand name, use value of auto in that case<fantasai> bramus: this would create a conflict with view-transition-name, so propose to disallow auto <bramus> s/custom/custom-ident <frances__> RESOLUTION: disallow auto for view transitions <fantasai> s/RESOLUTION/RESOLVED/ <fantasai> s/view transitions/view-transition-name/ <frances__> RESOLUTION: disallow auto for view-transitions-name/view-transitions <frances__> rossen: keep going to next issue |
We've resolved here w3c/csswg-drafts#9639 (comment) to disallow view-transition-name: auto as a valid identifier/name. Since this is a brekaing changing, this patch adds a use counter to count the number of uses, so that we have data to support removing it. R=bokan@chromium.org Bug: 1513460 Change-Id: I0f46f3533565cefdb42d93082d1cd3cd4a3a88b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5141666 Auto-Submit: Vladimir Levin <vmpstr@chromium.org> Commit-Queue: David Bokan <bokan@chromium.org> Commit-Queue: Vladimir Levin <vmpstr@chromium.org> Reviewed-by: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/main@{#1239874}
It should be rejected until it does something useful. I would expect it to provide a name automatically for view transitions. It's useful in the case you have a class for instance and but don't want to provide a name to every single element that is affected by that class. |
"Rejected" as in reject the whole transition? |
btw I don't think the name section.list li.item[:id] img { view-transition-name: item-[:id] } or some such |
"Rejected" as in rejected by the CSS parser, so if you set it on the root, then it won't override It should be pretty obvious for the developer they're using an unsupported value as it'll be striked out in the DevTools. |
Sounds effectively like |
Yea, something like that was proposed in #8320 (comment). In either case it probably won't be a single keyword that generates a name. |
In any case, I don't think leaving |
OK. The only difference between having it as an invalid value and having it behave the same as |
The other differences are:
|
Key difference here is that you’re able to capture an attribute from a parent element and use it in a child element. With /* Proposal by noamr */
section.list li.item[:id] img {
view-transition-name: item-[:id];
}
/* Reworked using attr() and ident() from https://github.com/w3c/csswg-drafts/issues/9141 */
section.list li.item[id] {
--id: attr(id);
img {
view-transition-name: ident("item-" var(--id));
}
} |
…ransition-name` (#9764) * [css-view-transitions-1] Treat `auto` as an invalid value Closes #9639 * Update css-view-transitions-1/Overview.bs Co-authored-by: Khushal Sagar <63884798+khushalsagar@users.noreply.github.com> * Add issue link --------- Co-authored-by: Khushal Sagar <63884798+khushalsagar@users.noreply.github.com>
WPT PR: web-platform-tests/wpt#44035 |
https://bugs.webkit.org/show_bug.cgi?id=267619 rdar://121094366 Reviewed by Anne van Kesteren. Adopt the resolution from: w3c/csswg-drafts#9639 Add a custom parsing function since the auto-generated function does not support custom-ident restrictions. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/parsing/view-transition-name-invalid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/parsing/view-transition-name-invalid.html: * Source/WebCore/css/CSSProperties.json: * Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp: (WebCore::CSSPropertyParserHelpers::consumeViewTransitionName): * Source/WebCore/css/parser/CSSPropertyParserHelpers.h: Canonical link: https://commits.webkit.org/273118@main
Currently the name
auto
is allowed asview-transition-name
. Given the talk about view-transition "classes" in #8319. I think it would be good to resolve on reserving the "auto" keyword so it can be leveraged if needed.I'm opening this as a separate issue since this is probably something we want to change in VT level 1 rather than level 2.
@khushalsagar @fantasai @tabatkins @noamr
The text was updated successfully, but these errors were encountered: