Re: [csswg-drafts] [css-view-transitions-1] Should block-in-inline splitting prevent `view-transition-name` from being used (#12217)

So a few things:

From: https://drafts.csswg.org/css-view-transitions-1/#capture-old-state-algorithm
> Note: [box fragment](https://drafts.csswg.org/css-break-4/#box-fragment) here does not refer to fragmentation of [inline boxes](https://www.w3.org/TR/CSS2/visuren.html#inline-boxes) across [line boxes](https://www.w3.org/TR/CSS2/visuren.html#line-box). Such inlines can participate in a transition.

If an inline gets fragmented it can still participate in a view-transition.

> Sorry should've clarified, so when you have <my-component><div/></my-component>, <my-component> generates two anonymous block fragments around (before and after) the <div>. In that case, I think <my-component> should be skipped. I think that's what @mattwoodrow was proposing, but maybe he can confirm? You're right that the block itself probably shouldn't be skipped tho.

This isn't what the resolution for [1477](https://github.com/w3c/csswg-drafts/issues/1477) was however:

> RESOLVED: In a block-in-inline split, the block is inside the inline in the box tree, and is a sibling of the two fragments of the inline in the fragment tree

So the inline gets fragmented, but it doesn't say anything about if anonymous blocks are inserted. Anonymous blocks are an implementation detail. Blink doesn't insert the anonymous blocks as you've described. We follow the box-tree structure in 1477. And the block-box is a sibling on the two inline fragments per that resolution.

I'm hesitant to resolve on this as it seems to come from:
https://bugs.webkit.org/show_bug.cgi?id=290923
Which seems like a valid usecase, and there isn't any fundamental reason not to support it.

(Also note there are bugs with block-in-inlines in WebKit like: https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=13823 ) 
```
<!DOCTYPE html>
<span style="opacity: 0;"><div style="background: red">hi</div></span>
```


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


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

Received on Thursday, 29 May 2025 23:46:24 UTC