Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
pagedjs
pagedjs
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 161
    • Issues 161
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 12
    • Merge Requests 12
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Tools
  • pagedjspagedjs
  • Issues
  • #150

Closed
Open
Opened Nov 04, 2019 by Arseny Mitin@mitinarseny
  • Report abuse
  • New issue
Report abuse New issue

string-set sets only first occurance of element on page

Given code:

@page {
  @bottom-center {
    content: string(title);
  }
}

h2 {
  string-set: title content(text);
}

If there are two h2 elements on the same page, @bottom-center of this page will be set to the value of first one, and that's OK. But following pages will have the same value, too, and that's NOT OK.

You can test the example here.

I am aware of position: running() elements, but in my case this solution is inconvenient as then I'll have to add extra element for this purpose, but HTML file in my case is generated by external tool and this tool do not have to be aware of this feature.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
1
Labels
generated content
Assign labels
  • View project labels
Reference: tools/pagedjs#150