[csswg-drafts] [css-gcpm][css-content] "string-set" on elements with no boxes: How to determine which page the assignment is on (#8404)

bernhardf-ro has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-gcpm][css-content] "string-set" on elements with no boxes: How to determine which page the assignment is on ==
The `string-set` property applies to "all elements, but not pseudo-elements", which includes elements with no boxes (e.g. via `display: none`).
Regarding such elements both specifications say ( after https://drafts.csswg.org/css-content-3/#valdef-string-first-except ):
"The content values of named strings are assigned at the point when the content box of the element is first created (_or would have been created if the element’s display value is none_)."

Determining where a box "would have been" is rather complex, as that could be influenced by it's height (near a page break) which in turn could be influenced by it's content. 
Adding that the hypothetical box should be considered to have a block-size of 0 would solve this for simple cases.

However in more complex contexts this would still not be easy to determine, e.g. when the `order` property is involved.
We would propose to go backwards through the DOM from the element until an element is found that has boxes in the content flow.
The page that the last of those boxes is on is the page of the assignment.
If coordinates on the page are also required they should be at the block-end of that box.
However, we would prefer that inside the page the order of assignments is strictly the DOM order.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8404 using your GitHub account


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

Received on Monday, 6 February 2023 13:24:59 UTC