-
Notifications
You must be signed in to change notification settings - Fork 687
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-2] Allow an auto-generated view-transition-name
that doesn't default to ID
#10995
Comments
Copying over my comment from 8320 for visibility:
|
Any thoughts on |
Not a big fan of it, but also not against it. I recently read up on This give me a new idea (which would alter the resolution from #8320): what if there was a function that allowed authors to list certain options and it returns the first non empty one?
That would prevent a lot of confusion on the author side, as Otoh it would require a little more typing if they want the fallback behavior, but it would also allow authors to add more options to the fallback: e.g. |
To me this feels too verbose for a feature that's supposed to be a DX convenience... I think once I think the direction the |
True. Other possible keyword values I can think of, as an alternative to
I think both clear convey that a value is automatically generated. (Curious to know if @nt1m or @fantasai have suggestions or a preference here) |
Fwiw, the same feature in the |
I like |
We don't really need |
Looking at the results of these polls:
There is clear mismatch between how authors interpret the keywords and what is currently resolved on and/or proposed within the working group. Authors don’t interpret
Two people shared loose replies that suggested the keyword
I kinda forgot that Winging back tot he naming/keywords aspect: can we meet authors here? Strawperson suggestion:
This matches with how they interpret things. |
I disagree with this. The I'm personally not sure we need something like |
For today’s breakout session, I think there are two paths forward:
Things to consider:
Something that just came to mind: the keyword that covers the “automatically generate me a name” case can potentially be reused in the |
Agree with @nt1m here, and I think the Twitter poll was not worded in a way to answer the question of “is our current definition for |
The CSS Working Group just discussed
The full IRC log of that discussion<fantasai> bramus: This issue is about allowing an auto view-transition-name to be generated by specifying a keyword<fantasai> bramus: a number of keywords suggested, from-element, per-element, self, auto, auto-id <fantasai> bramus: I asked authors "which keyword conveys using ID and falling back to auto-generated" and "which keyword conveys automatically generated" <fantasai> bramus: when I asked which is "automatically generated", they picked "auto" <fantasai> bramus: when I asked about the ID and fallback, the responses ... <fantasai> bramus: We were thinking 'from-element' but authors expected 'auto' for "automatically generated". <fantasai> bramus: we could meet developers by reverting previous resolution about auto reading ID and falling back <fantasai> bramus: and come up with a better keyword <fantasai> bramus: or push authors towards using attr() function which is suited for this, can use attr(id, auto) for fallback behavior <fantasai> bramus: or keep previous resolution of using auto for fallback behavior, but then we need to come up with a very good keyword for the autogeneration <fantasai> bramus: Authors prefer auto-id for autogenerated, and some suggested generated <fantasai> bramus: and some others said, don't we have attr() for this? <bramus> fantasai: we can conclude from the poll that there is cnofusion over keywords <bramus> … wording of poll most likely prompted some of the responses <bramus> … using “automatically generated id” pushed authors towards `auto` <bramus> … internally we are generating one, bu thtat is just the meachism <bramus> … it is an internal detail <bramus> … the will never see it … we might not even generate one and use poitner identity <bramus> … its not about automatically generating ids, its about the identify of the element object <bramus> … poll is propably a but confused on that point <bramus> … could try to come up with good keywords but maybe need some more ideas <bramus> … but doesnt mean that we should revert decision on `auto` <bramus> … in terms of possible keywords: `mathc-elememtn` is an option as we use match in a few other places <bramus> … but open to ideas <astearns> q+ <bramus> … at webkit we think `auto` is the right way to define it <khush> q+ <astearns> ack fantasai <bramus> … and maybe need other keyword for the other thing <noamr> I like match-element <bramus> astearns: the currently specced behavior for auto is to use the id attr and fall back to auto generated one? <bramus> fantasai: its to use the identity of the element <bramus> … if there is no id, we look at the element being the same object or not <bramus> … in that case, the object hasnt been destroyed - its a singular one that you can map between tree versions <astearns> ack astearns <astearns> ack khush <bramus> khush: spec might say to generate one, but conceptually get the point that that is one way to implement it. you don”t need strings to establish identity <bramus> … of all options maybe self is nice as it doesnt hit at generating something <florian> q+ <bramus> … your identtity is the nodes identity <bramus> … auto is confusing. kind of a grab value in css to figure out automatically what to do which is what we doing here as well <astearns> ack florian <fantasai> match-element? same-element? <bramus> florian: explanation fantasai just gave: if that can be used. key point is stability … so maybe akeyword like stable? <bramus> … if the elemen tis still around it will be the same <noamr> q+ <bramus> … dont describe what we do but the why <astearns> ack noamr <bramus> noamr: I like match-element. we match not just the id, but the actual elements <bramus> … matching two state of the same element <bramus> q+ <khush> i'm ok with match-node or match-element <fantasai> bramus: I like all these suggestions just now, `stable` and `match-element`. <fantasai> bramus: doesn't seem confusing <astearns> ack bramus <fantasai> bramus: `from-element` implies reading from the element, but matching is matching so seems like a good suggestion <fantasai> bramus: wrt `auto` part, as DevRel we can hammer on this point, means "try to get a name" not "automatically generate one" <fantasai> astearns: which method do we expect authors to use most? <fantasai> noamr: It depends <fantasai> noamr: Likely use explicit names. Otherwise likely to use auto, it will just work. <fantasai> noamr: But if they want to specifically say that id attrs don't participate, then use match-element <fantasai> noamr: I think auto would be more common, it will usually just work. <fantasai> noamr: element identity, not observable if generated string <fantasai> astearns: We have a way of using the ID attribute, specifically, by using attr() function <fantasai> astearns: we have defined `auto` to match the element by ID if there is one, or using other methods if not <fantasai> astearns: Is there really a use case for "throw out the IDs and only use the opaque element-matching algorithm" ? <fantasai> khush: Point came up last time, if these are only two (auto and attr(id)), then there's no way to say "I want to match based on element identity even though I put an ID on it" <fantasai> noamr: You wouldn't be able to match if element has an ID in only one of the state <fantasai> khush: or if ID is used for a different reason, and not used in view transitions <fantasai> astearns: I can see the case, but not expecting authors to run into it much <fantasai> noamr: cleaner solution to have specific keywords for each behavior <fantasai> astearns: understand, but that's a theoretical purity argument <fantasai> khush: We heard from one [missed] <astearns> ack fantasai <bramus> fantasai: in terms of the name clashing we might want to consider namespacing ids taken from the element vs names that we put direclty into css <astearns> s/[missed]/AirBnB where teams use ids for entirely different things <bramus> … that would avoid name clasing <bramus> … already have pseudo selelcting syntax but are not using the ! sign for keywords. Could say tha ti fyou pull the id from the attr, then it gets prefixed with the ! sign in the matching. <noamr> q+ <bramus> … that would namespace it and avoid clashes <fantasai> s/!/#/g <bramus> astearns: this would be an additional thing <bramus> fantasai: would mean for auto and I guess attr() tha twe are generating the namemt hen you would use v-t-g(#id) to select and style it <bramus> q+ <bramus> khush: not sure about this, but maybe could do it for auto-generated ones. Not for those read from attr. <bramus> … will be a pain to keep track of where it came fromg <bramus> fantasai: fair <astearns> ack noamr <bramus> noamr: against namespacing because of flexibility of VTs. <bramus> … take cross-doc VT with #hero id on one side and one with hero v-t-name on other side <bramus> … would want to transition between those <bramus> khush: can open issue separately from this <astearns> ack bramus <fantasai> bramus: Just realized, we could not tackle this problem as part of view transitions, keep auto as it is, and look at the ident() function and allow it to take a keyword <fantasai> bramus: so if you want to auto-generate an ident you use it <bramus> fantasai: so ident() should take wjhat? <bramus> bramus: `view-transition-name: ident(auto)` to auto-generate an ident <bramus> … so we dont have to come up with a keyword for this <bramus> fantasai: but that retrurns an actual observable identifier <bramus> … which we dont think we want to do <bramus> … should still have keyword for it <noamr> q+ <bramus> … can consider is distinguishing between auto keyword actually creating a referencable v-t-n or just an internal matching <bramus> … can you selec tagainst the generated identifier is an open question <bramus> … would we do that or just use the id attr to match elements but not to select against it <bramus> … like `::v-t-g(id)` <bramus> khush: would be nice if you could do it for for the `[id]` case <bramus> … pretty convenient <bramus> fantasai: only downside is that we might have namespace clashes and stuff that you are using for identity in the document <bramus> noamr: right, mixing things <bramus> fantasai: can agree on keeping `auto` as it is <bramus> … and for now add a keyword `match-element` for only looking at element id <bramus> … and open issue to mix the namespaces <noamr> q- <fantasai> s/to mix/about mixing/ <bramus> astearns: Gonna need async resolution as we are low on people attending <bramus> PROPOSED RESOLUTION: Add `match-element` keyword that will only use element identity and not use id attributes. <bramus> astearns: will be submitted as an async resolution <fantasai> RESOLVED: [Pending async confirmation] `auto` will match elements using their ID attributes, falling back to element identity; `match-element` will only use element identity. |
https://bugs.webkit.org/show_bug.cgi?id=282344 rdar://138932551 Reviewed by NOBODY (OOPS!). See w3c/csswg-drafts#10995 * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/match-element-name-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/match-element-name-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/match-element-name.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/parsing/view-transition-name-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/parsing/view-transition-name-valid.html: * Source/WebCore/css/CSSProperties.json: * Source/WebCore/css/CSSValueKeywords.in: * Source/WebCore/dom/ViewTransition.cpp: (WebCore::effectiveViewTransitionName): * Source/WebCore/rendering/style/ViewTransitionName.h: (WebCore::Style::ViewTransitionName::createWithMatchElement): (WebCore::Style::ViewTransitionName::isMatchElement const): (WebCore::Style::operator<<): * Source/WebCore/style/StyleBuilderConverter.h: (WebCore::Style::BuilderConverter::convertViewTransitionName):
https://bugs.webkit.org/show_bug.cgi?id=282344 rdar://138932551 Reviewed by NOBODY (OOPS!). See w3c/csswg-drafts#10995 * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/match-element-name-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/match-element-name-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/match-element-name.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/parsing/view-transition-name-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/parsing/view-transition-name-valid.html: * Source/WebCore/css/CSSProperties.json: * Source/WebCore/css/CSSValueKeywords.in: * Source/WebCore/dom/ViewTransition.cpp: (WebCore::effectiveViewTransitionName): * Source/WebCore/rendering/style/ViewTransitionName.h: (WebCore::Style::ViewTransitionName::createWithMatchElement): (WebCore::Style::ViewTransitionName::isMatchElement const): (WebCore::Style::operator<<): * Source/WebCore/style/StyleBuilderConverter.h: (WebCore::Style::BuilderConverter::convertViewTransitionName):
https://bugs.webkit.org/show_bug.cgi?id=282344 rdar://138932551 Reviewed by NOBODY (OOPS!). See w3c/csswg-drafts#10995 * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/match-element-name-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/match-element-name.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/parsing/view-transition-name-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/parsing/view-transition-name-valid.html: * Source/WebCore/css/CSSProperties.json: * Source/WebCore/css/CSSValueKeywords.in: * Source/WebCore/dom/ViewTransition.cpp: (WebCore::effectiveViewTransitionName): * Source/WebCore/rendering/style/ViewTransitionName.h: (WebCore::Style::ViewTransitionName::createWithMatchElement): (WebCore::Style::ViewTransitionName::isMatchElement const): (WebCore::Style::ViewTransitionName::scopeOrdinal const): (WebCore::Style::operator<<): * Source/WebCore/style/StyleBuilderConverter.h: (WebCore::Style::BuilderConverter::convertViewTransitionName):
The CSSWG will automatically accept this resolution one week from now if no objections are raised here. Anyone can add an emoji to this comment to express support. If you do not support this resolution, please add a new comment. Proposed Resolution: |
I strongly feel the current direction is a mistake.
I understand where this is coming from, but I don't think 'some completely different behaviour' is at all sensible. The behaviour is only the same between same & cross-document transitions if every element has an Given this, having two features:
…seems much more sensible and easier to understand. The first feature will behave consistently between same & cross-document transitions. The second won't work cross-document at all, but it's easy to understand why - the nodes are different. By smashing them into one feature, instead of having one feature that consistently works cross-document, and one that consistently doesn't work cross-document, we're ending up with one feature that doesn't behave consistently. Even worse, parts of the transition might kinda work, depending on which elements have IDs, and it's going to be hard for developers to figure out why Even if you learn that " Given how different these features are, as I developer I want to pick between them. I don't want the UA picking for me. I don't want removing an |
These two features you mention already exist:
|
My point is that it isn't doing the right thing, it's obfuscating doing an unreliable thing. If I want the thing to work for both SPA and MPA, then I'll use If I only want the thing to work SPA, then I guess it's interesting that The good thing about |
That ship has sailed: https://webkit.org/blog/16301/webkit-features-in-safari-18-2/#:~:text=WebKit%20for%20Safari%2018.2%20adds%20support%20for%20view%2Dtransition%2Dname%3A%20auto |
That's awful. @astearns does the CSS working group support that kind of behaviour? |
@fantasai can you comment on |
When I was working more closely on this feature, I put a lot of care into making sure folks across the group were happy with the design and spec of this feature, same with other features like |
I appreciate all of the discussion about Agenda+ to add |
I believe what happened is that there was agreement on adding it as re-iterated in the OP above, it was added to the spec, the WebKit team promptly implemented it in good faith as published in the spec and tested in WPT, and the objection subsequently raised here was too late to make any changes to the release.
Not an objection, but, what is the use case for |
Fallback value for [data-view-transition-name] {
view-transition-name: attr(data-view-transition-name type(<custom-ident>), match-element);
} |
Complex web-apps (think AirBnb), where different teams are responsible for different parts of the document, and the team working on view transitions does not want the transitions to be changed beneath their feet by unrelated changes made in the DOM. |
Is it too late to remove it from the next release? |
At Shopify we have the same case @noamr mentions, but also we don't want cases where it half-works when we choose to do a cross-document transition. It's much more reliable to have a feature like
|
Here's an example of the case @noamr is talking about: Imagine a list of items, where the first is a bigger "main" one. The list is reordered, and the developer wants to create a transition between them. The developer uses Then, another team wants to create a skip-link to the main item, so they add The transition is now broken. |
@jakearchibald As you know, Apple does not comment on future releases. :) Thanks for the concrete example, that helps. |
The CSS Working Group just discussed
The full IRC log of that discussion<bramus> noamr: we have a way to generate v-t-names with the keyword `auto`.<bramus> … auto generates name based on the id attribute or element identity when two elements on both end of the VT are the same. <bramus> … the id approach also works cross-document <bramus> … are proposing other value where it does not try to do the `[id]` check first. only uses element identity, only working in same-doc VTs <JakeA> q+ <bramus> … in the breakout for VTs a few weeks ago elika proposed match-element which we like <bramus> … are proposing to put that as a function for the purpose of feature detection <bramus> … because right now `v-t-n: match-element` parses as supported <bramus> … important to ship both things together. bigger groups of people who ship sites need a better layering. <Rossen1> q? <bramus> … auto has a better default behavior, but want to allow people to use a cleane rseparation if they so choose <Rossen1> ack fantasai <Zakim> fantasai, you wanted to comment on parsin and to comment on parsing <bramus> fantasai: so the v-t-n accepts none an dcustom ident, which start with double dash <bramus> … browsers should be rejecting any value that does not start with -- <bramus> … dont think we should introduce `()` <bramus> bramus: dashed idents are subset of custom idents <emilio> q+ <vmpstr> +1 <bramus> fantasai: oh, right. still dont like the parenthesis <Rossen1> ack JakeA <fantasai> fantasai: implies there's argument, but definitely there's none <bramus> JakeA: I think we should unship/unspec `auto` as it exists now <bramus> … aim of VTs was to have same behavior for same-doc and cross-doc <bramus> … `match-element` is a useful departure from that but need to make it clear that the behavior only works in one of the two <bramus> … `auto` muddies the water as it has `match-elemetn` but also `[id]` and creates this half-working feature but definitely different between MPA and SAP <bramus> … I dont think that `auto` as “will do it all for you” here <bramus> … might come up with other triggers like hover - should make sure definition of a transition is the same <Rossen1> ack emilio <bramus> emilio: strong agree with fantasai. no need for (). lot of other props with similar syntax restrict which idents they can parse <JakeA> q+ <noamr> q+ <bramus> … am sure we can come up with an ident that is not a compat conceren <Rossen1> ack fantasai <bramus> fantasai: like to focus on noam’s ask of whether we add match element. <bramus> … lets discuss meaning of auto later <Rossen1> ack JakeA <bramus> JakeA: i want to make sure that `match-element` is not as useful as people think it is <bramus> … similar in codepen/tech demos <bramus> … but if you are doing a page transition, its common for simple case to replace large parts of the DOM using innerHTML, which are different elements <bramus> … element equality is not guaranteed <Rossen1> ack noamr <JakeA> That's an argument for not adding this behaviour into something like `auto` <bramus> noamr: regarding compat: we could go back to CSS vt-1 and make it an illegal keyword <JakeA> …because it's a complex behaviour and you need to know what you're opting into <bramus> … think about compat is not about whether sites use it, its whether sites would catch it <dbaron> For what it's worth, I think I have different opinions about element equality: https://dbaron.org/log/20200221-dom-identity <JakeA> q+ <bramus> … to go back to vt-1 then say that its illegal, then new implementations can do that <bramus> … instead of try and parsing it as a name <bramus> … but right now in current implementations it does parse <bramus> q+ <Rossen1> ack fantasai <bramus> fantasai: there is a wide grey area in types of ?? and web apps between a demo page and sth that is using a particular framework style <bramus> … we should be designing CSS to be usable and comfortable to it <bramus> … I reject his argument that element identity is not useful at all <Rossen1> ack JakeA <bramus> JakeA: didnt say it wasnt usefull at all, but that it is less useful <fantasai> s/at all/at all on real websites/ <bramus> … I covered other ground of simple page changes that fetch data and innerHTML it <noamr> agree that match-element is useful for a lot of the spectrum, but attr() and ident() can cover a lot of the more complex/frameworky cases <bramus> … in all simple demos I created they use innerHTML <bramus> … widely used pattern, outside of frameworks <bramus> JakeA: I am worrried about kicking the auto discussion down the road <bramus> … concerns were raised in october and safari shipped in december <bramus> … not covering now could leave us stuck with it <bramus> fantasai: given that chrome is not even shipping can indicatate that its a really useful feature <astearns> -1 to the practice of allowing browsers to ship things and then see if compat issues come up <bramus> … if we both shippped it and it was harmful then ??? <bramus> … fine to discuss, but dont think we need to resolve <JakeA> q+ <fantasai> s/???/it would be urgent to remove/ <fantasai> s/resolve/resolve today necessarily/ <Rossen1> ack JakeA <bramus> JakeA: agree with it just being safari then there is less of a riks <bramus> … but dont like that being used as an excuse <bramus> … more worried about that if it does get used, it’s sold as a “we’ll do things for you” but it has footguns detailed in the thread <astearns> q+ <bramus> … could block us from doing useful things in the future <Rossen1> ack bramus <noamr> bramus: re match-element being a function, it solves a short term, while in the long term a keyword would be best <noamr> bramus: fine with match-element as a keyword, even without it being feature-detectable <fantasai> +1 let's design for hte ong term <fantasai> s/hte ong/the long/ <Rossen1> ack astearns <bramus> astearns: at the very least I would appreciate it if the Safari would stop talking about the `auto` value until we figure out whether we can support it long term or want it to go away <noamr> astearns: at the very least I would appreciate it if the Safari folks would not talk about the auto value until we figure out if we want to support it long term <bramus> … the less it gets evanglized the more options we have in the future <bramus> Rossen1: ok, let’s see if we can wrap this up <bramus> noamr: proposed resolution would be then to have match-element as keyword and thus to disallow it as a name in v-t-1 <JakeA> +1 to `match-element` <bramus> Rossen1: Any additional feedback or objections? <bramus> fantasai: overall sounds good <bramus> … did we call the other names? `self` and `match-element` <bramus> … tab commented we should have a keyword that also works equally well in `random()` <bramus> Rossen1: which one of the two is currently being used int he issue or spec? <bramus> fantasai: mostly `match-element` is used <bramus> Rossen1: can we stick to that for now and bikshed later? <vmpstr> +1 to `match-element` <Rossen1> ack fantasai <bramus> noamr: this is already result of a lot of bikshedding inthe issue and a breakout before <bramus> … I suggested `self` but like `match-element` today <bramus> Rossen1: OK <JakeA> (I'm not tied to the name `match-element`, as long as it's a name that suggests the behaviour as much as possible) <bramus> RESOLVED: use the `match-element` keyword for this and disallow it as a value in vt1 spec |
…name: match-element match-element works the same as auto, except doesn't try to use the ID as the name. Resolution: w3c#10995 (comment)
As per CSS resolution, match-element works identically to auto, except it doesn't start with ID. See w3c/csswg-drafts#10995 (comment) Using a different flag from `auto` as that behavior is controversial. WPTs are imported directly from a WebKit PR that's not yet merged. Bug: 365997248 Change-Id: I00973545bfbae116113e9adaea12c8bcc7ea0dd5
https://bugs.webkit.org/show_bug.cgi?id=282344 rdar://138932551 Reviewed by NOBODY (OOPS!). See w3c/csswg-drafts#10995 (comment) * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/match-element-name-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/match-element-name.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/parsing/view-transition-name-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/parsing/view-transition-name-valid.html: * Source/WebCore/css/CSSProperties.json: * Source/WebCore/css/CSSValueKeywords.in: * Source/WebCore/dom/ViewTransition.cpp: (WebCore::effectiveViewTransitionName): * Source/WebCore/rendering/style/ViewTransitionName.h: (WebCore::Style::ViewTransitionName::createWithMatchElement): (WebCore::Style::ViewTransitionName::isMatchElement const): (WebCore::Style::ViewTransitionName::scopeOrdinal const): (WebCore::Style::operator<<): * Source/WebCore/style/StyleBuilderConverter.h: (WebCore::Style::BuilderConverter::convertViewTransitionName):
@fantasai you've mentioned a few times that I'm not thinking about a broad range of web site builds in my arguments here. I really don't think that's the case. Build style 1: a component demo in codepen
What we really need here is scoped view transitions, and I think Build style 2: a simple no-framework page transitionThe most common way people hand-roll SPA style page loads, in a progressive enhancing way, is to load the HTML of the target page and inject it into the current page via something like I used this style for my basic view-transition demos because it only takes a couple of lines of JS using the navigation API. But, the result of this is that some things that are intended to be the same are different elements, such as the header in the example above.
A more stable solution here would be assigning unique Build style 3: VDOM frameworksI know there's a lot of distaste for frameworks in this group, and I recognise their issues, but they are popular. In this system you sometimes get element equality, but sometimes you don't. It's mostly an optimisation. If an element stays within the same parent, you can usually keep the same element instance intentionally. However, folks often get this wrong, and end up with new elements, or worse, element equality with something else.
I promise you I'm not coming at this from a framework-first perspective. I've built sites by dragging HTML files into an FTP client, and PHP with progressive enhancement, and all the way up to big horrible framework sites. I'm drawing on all of those styles in my recommendation here. It looks to me like I'm happy that we're shipping |
As per CSS resolution, match-element works identically to auto, except it doesn't start with ID. See w3c/csswg-drafts#10995 (comment) Using a different flag from `auto` as that behavior is controversial. WPTs are imported directly from a WebKit PR that's not yet merged. Bug: 365997248 Change-Id: I00973545bfbae116113e9adaea12c8bcc7ea0dd5
https://bugs.webkit.org/show_bug.cgi?id=282344 rdar://138932551 Reviewed by Matt Woodrow. See w3c/csswg-drafts#10995 (comment) * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/match-element-name-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/match-element-name.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/parsing/view-transition-name-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/parsing/view-transition-name-valid.html: * Source/WebCore/css/CSSProperties.json: * Source/WebCore/css/CSSValueKeywords.in: * Source/WebCore/dom/ViewTransition.cpp: (WebCore::effectiveViewTransitionName): * Source/WebCore/rendering/style/ViewTransitionName.h: (WebCore::Style::ViewTransitionName::createWithMatchElement): (WebCore::Style::ViewTransitionName::isMatchElement const): (WebCore::Style::ViewTransitionName::scopeOrdinal const): (WebCore::Style::operator<<): * Source/WebCore/style/StyleBuilderConverter.h: (WebCore::Style::BuilderConverter::convertViewTransitionName): Canonical link: https://commits.webkit.org/288102@main
As per CSS resolution, match-element works identically to auto, except it doesn't start with ID. See w3c/csswg-drafts#10995 (comment) Using a different flag from `auto` as that behavior is controversial. WPTs are imported directly from a WebKit PR that's not yet merged. Bug: 365997248 Change-Id: I00973545bfbae116113e9adaea12c8bcc7ea0dd5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6105953 Auto-Submit: Noam Rosenthal <[email protected]> Reviewed-by: Vladimir Levin <[email protected]> Commit-Queue: Vladimir Levin <[email protected]> Cr-Commit-Position: refs/heads/main@{#1398756}
As per CSS resolution, match-element works identically to auto, except it doesn't start with ID. See w3c/csswg-drafts#10995 (comment) Using a different flag from `auto` as that behavior is controversial. WPTs are imported directly from a WebKit PR that's not yet merged. Bug: 365997248 Change-Id: I00973545bfbae116113e9adaea12c8bcc7ea0dd5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6105953 Auto-Submit: Noam Rosenthal <[email protected]> Reviewed-by: Vladimir Levin <[email protected]> Commit-Queue: Vladimir Levin <[email protected]> Cr-Commit-Position: refs/heads/main@{#1398756}
…ement, a=testonly Automatic update from web-platform-tests Implement view-transition-name: match-element As per CSS resolution, match-element works identically to auto, except it doesn't start with ID. See w3c/csswg-drafts#10995 (comment) Using a different flag from `auto` as that behavior is controversial. WPTs are imported directly from a WebKit PR that's not yet merged. Bug: 365997248 Change-Id: I00973545bfbae116113e9adaea12c8bcc7ea0dd5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6105953 Auto-Submit: Noam Rosenthal <[email protected]> Reviewed-by: Vladimir Levin <[email protected]> Commit-Queue: Vladimir Levin <[email protected]> Cr-Commit-Position: refs/heads/main@{#1398756} -- wpt-commits: 437e022f92891ea6a07182788298ec23eebea3b1 wpt-pr: 49766
…ement, a=testonly Automatic update from web-platform-tests Implement view-transition-name: match-element As per CSS resolution, match-element works identically to auto, except it doesn't start with ID. See w3c/csswg-drafts#10995 (comment) Using a different flag from `auto` as that behavior is controversial. WPTs are imported directly from a WebKit PR that's not yet merged. Bug: 365997248 Change-Id: I00973545bfbae116113e9adaea12c8bcc7ea0dd5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6105953 Auto-Submit: Noam Rosenthal <[email protected]> Reviewed-by: Vladimir Levin <[email protected]> Commit-Queue: Vladimir Levin <[email protected]> Cr-Commit-Position: refs/heads/main@{#1398756} -- wpt-commits: 437e022f92891ea6a07182788298ec23eebea3b1 wpt-pr: 49766
As per CSS resolution, match-element works identically to auto, except it doesn't start with ID. See w3c/csswg-drafts#10995 (comment) Using a different flag from `auto` as that behavior is controversial. WPTs are imported directly from a WebKit PR that's not yet merged. Bug: 365997248 Change-Id: I00973545bfbae116113e9adaea12c8bcc7ea0dd5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6105953 Auto-Submit: Noam Rosenthal <[email protected]> Reviewed-by: Vladimir Levin <[email protected]> Commit-Queue: Vladimir Levin <[email protected]> Cr-Commit-Position: refs/heads/main@{#1398756}
In #8320, we resolved on using
view-transition-name: auto
as a way to generate names, using the element's id if exists.In the resolution, we said that we'll have another value for generating the name without falling back to ID, and perhaps yet another one for generating it only from ID.
Proposing:
view-transition-name: self
as the keyword for generating the name ignoring ID. Other proposals that were raised werefrom-element
andelement-uuid()
.attr(<ident> id)
.The text was updated successfully, but these errors were encountered: