- From: Sanders Kleinfeld <sanders@oreilly.com>
- Date: Mon, 10 Aug 2015 18:21:15 -0400
- To: Dave Cramer <dauwhe@gmail.com>
- Cc: HÃ¥kon Wium Lie <howcome@opera.com>, Daniel Glazman <daniel.glazman@disruptive-innovations.com>, public-digipub <public-digipub@w3.org>
Thanks for surfacing this, Dave!
On Mon, Aug 10, 2015 at 12:52 PM, Dave Cramer <dauwhe@gmail.com> wrote:
>
> I found a proposal that might also satisfy the use case [1]:
>
> a[href] {
> // Use x-target-is as a switch for which link text to use
> content: x-target-is(attr(href), 'figure') 'See Figure';
> // Link to a section WITHOUT a title
> content: x-target-is(attr(href), 'section:not(:has(>.title))')
> 'See ' target-text(attr(href), content(before));
> // Link to a section **with** a title
> content: x-target-is(attr(href), 'section:has(>.title)')
> 'See ' target-text(attr(href), content(before))
> target-text(attr(href), content('> .title'));
> }
Yes, this would also satisfy my use case :)
>
>
> Dave
>
>
> [1] http://philschatz.com/css-polyfills.js/#section-target-counters
>
Received on Monday, 10 August 2015 22:21:44 UTC