Re: [csswg-drafts] [css-content-3] target-text can create a loop (#4610)

That's correct, yes. It is defined as that, and implemented this way in at least AH Formatter, RealObjects PDFReactor and I believe also "paged.js" - although as the definitions of these functions have been hopping about from css-content, css-gcpm and css-lists for the last few years it's a bit difficult to keep track.

The second parameter to target-text is defined in css-content as "... using the same values as the string-set property..." - which is defined in gcpm: https://drafts.csswg.org/css-gcpm/#funcdef-content

> before = The string value of the ::before pseudo-element, determined as if white-space: normal had been set.

To lift an examples from that spec demonstrating `string-set`:
```css
h1::before { content: 'Chapter ' counter(chapter); }
h1 { string-set: header content(before) ':' content(text); }
h1::after { content: '.'; }

The value of the named string “header” will be “Chapter 1: Loomings”.
```

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

Received on Tuesday, 17 December 2019 17:31:17 UTC