Re: [csswg-drafts] [css-view-transitions-2] Proposal for a view-transition-tree property (name tbd) (#10334)

One approach would be to make `view-transition-parent` an inherited property, so to accomplish the use-case in question you would do something like the following:

```css
.container {
  view-transition-name: container;
  view-transition-tree: preserve;
  view-transition-parent: none;
}
.special-item {
  view-transition-name: special-item;
  view-transition-parent: container;
}
.other-item {
  view-transition-name: other-item;
  /* view-transition-parent: none is inherited from .container */
}
```

I think whether or not `view-transition-parent` should be inherited is a worthwhile topic on its own, since if an element wants to have a different parent, presumably all its children by default also want to have that parent? Or are there use cases where this is not true?

-- 
GitHub Notification of comment by vmpstr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10334#issuecomment-2125049084 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 22 May 2024 15:10:59 UTC