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 153
    • Issues 153
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 11
    • Merge Requests 11
  • 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
  • #15

Closed
Open
Opened May 06, 2018 by Julie Blanc@JulieBlanc
  • Report abuse
  • New issue
Report abuse New issue

Problem : margins must be given to all page templates

Problem : margins must be given to all page templates.

With the following code, the margins disappear from the right pages.

@page{
  size: 140mm 205mm;
  margin: 12mm 12mm;
}

@page:right {
  @top-left{
    ...
  }
}

The problem is solved by adding the size of the margins in the right page, like this :

@page{
  size: 140mm 205mm;
  margin: 12mm 12mm;
}

@page:right {
  margin: 12mm 12mm;
  @top-left{
    ...
  }
}

The correct version is that if the margins are declared only in @page, they also apply on @page:right that are declared without margins. It's the same for the other page selector (@page:left, @page:first, @page:nth(x))

The rule is that pages with selector has priority on @page, but properties of @page remains if it is not declared in pages with selectors.


Same problem with named pages.

With the following code, the margins disappear from the named pages "chapter".

@page{
  size: 140mm 205mm;
  margin: 12mm 12mm;
}

section {
  page: chapter
}

@page chapter {
  @top-center{
    ...
  }
}

The correct version is that if the margins are declared only in @page, @page:right and @page:left , they also apply on @page:chapter that are declared without margins. The left pages of chapter pages has the same margins as @page:left and the right pages of chapter pages has the same margins as @page:right

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
3
Labels
CSS In Progress page template
Assign labels
  • View project labels
Reference: tools/pagedjs#15