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 145
    • Issues 145
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 8
    • Merge Requests 8
  • 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
  • #234

Closed
Open
Opened Aug 12, 2020 by Thomas Parisot@oncletom
  • Report abuse
  • New issue
Report abuse New issue

`@media` in original document CSS is not written as is

Hello,

I'm trying Paged.js on a page which embeds html5 boilerplate. It adds this style:

@media print {
 *,
 :after,
 :before {
  color:#000!important;
  text-shadow:none!important;
  background:0 0!important;
  -webkit-box-shadow:none!important;
  box-shadow:none!important
 }

 a,
 a:visited {
  text-decoration:underline
 }

 /* ... */

}

When Paged.js injects it in the document again, it looks like this instead:

@media print {
}
*,
:after,
:before {
 color:#000!important;
 text-shadow:none!important;
 background:0 0!important;
 -webkit-box-shadow:none!important;
 box-shadow:none!important
}
a,
a:visited {
 text-decoration:underline
}
/* ... */

It seems the CSS declaration is not wrapped within its containing media query. So some styles leak all over the place (and in this case, I cannot undo them).

Edited Aug 12, 2020 by Thomas Parisot
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: tools/pagedjs#234