[csswg-drafts] [css-gcpm] Clarify meaning of "start" in string(), element() functions (#3521)

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

== [css-gcpm] Clarify meaning of "start" in string(), element() functions ==
In [css-gcpm](
https://drafts.csswg.org/css-gcpm/#using-named-strings) both the string() and element() function take a "scope", which can be "first", "start", "first-except" or "last".

The "start" value needs a minor clarification. The definition is:

> **start** - If the element is the first element on the page, the value of the first assignment is used. Otherwise the entry value is used. The entry value may be empty if the element hasn’t yet appeared.

When determining if an element on the page is first, do we include:

* any elements continued from the previous page? I think not: all pages after the first will have a continuation of the root element, so nothing will match.

* any elements continued from the previous page that have visible content? If the text below was continued from a `<p>` on the previous page and the heading had `string-set: heading content()`, would `content: string(heading start)` match the heading element?

![heading](https://user-images.githubusercontent.com/989243/51183320-c9391d00-18c8-11e9-8276-069f50706842.png)

This one is more open to interpretation. If continued text is ignored, I would change the spec to read "_the first element **opened** on the page_".

Otherwise I would suggest adding something like "An element is considered the first element on the page if there is no replaced content or text on the page that preceded the element, in document order". Limiting it to replaced content or text will remove any complexities coming from borders being repeated on the next page due to [`box-decoration-break: clone`](https://drafts.csswg.org/css-break-3/#break-decoration)

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

Received on Tuesday, 15 January 2019 13:57:19 UTC