Skip to content

'target-counter' browser support #49

@debeetle

Description

@debeetle

Thanks for this project! I've been benefit a lot for creating my own article css.

However, I got stuck at the target-counter css function. After digging the internet, it seems like most browser has not implemented it yet. Am I missing something? How can I get the <a href="#example-figure" class="figure"></a> work properly? In other words, does it only work with prince?

I also checked the resource of the interactive web paper mentioned in the sample output blog. Found that it manually set the content in the <a> tag like cite href="#tablefreq" class="table">1</cite> to show the counter, which uses cite here. And the cite css is:

cite.table {
  content: target-counter(attr(href, url), table);
}
cite.table:before {
  content: "Table ";
}
cite.table:after {
  content: "";
}

Looking forward to the response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions