New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS @page rule seems to be ignored if imported by @import rule #520

Closed
berndnicklas opened this Issue Oct 6, 2017 · 6 comments

Comments

Projects
None yet
3 participants
@berndnicklas

berndnicklas commented Oct 6, 2017

Hello,

while referencing a file pagerule.css containing

/* rule #1 */
@page {
  size: A4;
  margin-top: 1.5cm;
  margin-right: 1.5cm;
  margin-bottom: 1.5cm;
  margin-left: 2.5cm;
}

/* rule #2 */
body {
  background-color: lime;
}

directly in HTML via

<link rel="stylesheet" href="pagerule.css" />

works like a charm, it seems that importing the file via CSS

@import url("pagerule.css");

or

@import url("pagerule.css") all;

into a referenced CSS file only processes rule #2 while rule #1 (the page rule) is completely ignored. On weasyprint command line interface with verbosity switched on, no warnings or errors are printed.

In Chrome print preview this is rendered correctly.

Is this a bug or intended behaviour?

Best regards,

Bernd

@liZe liZe modified the milestones: v0.41, v0.42 Oct 6, 2017

@liZe liZe closed this in 3fb6747 Oct 6, 2017

@liZe

This comment has been minimized.

Show comment
Hide comment
@liZe

liZe Oct 6, 2017

Member

What a dirty bug! Thanks for your really explicit report!

Member

liZe commented Oct 6, 2017

What a dirty bug! Thanks for your really explicit report!

@liZe liZe added the bug label Oct 6, 2017

@berndnicklas

This comment has been minimized.

Show comment
Hide comment
@berndnicklas

berndnicklas Oct 9, 2017

Thank's for your quick fix!

berndnicklas commented Oct 9, 2017

Thank's for your quick fix!

@djKooks

This comment has been minimized.

Show comment
Hide comment
@djKooks

djKooks Nov 15, 2017

@liZe I'm also facing with same bug. Is fixed version released?

djKooks commented Nov 15, 2017

@liZe I'm also facing with same bug. Is fixed version released?

@liZe

This comment has been minimized.

Show comment
Hide comment
@liZe

liZe Nov 15, 2017

Member

@liZe I'm also facing with same bug. Is fixed version released?

No, it's not released yet, there's a couple of issues I'd like to fix before the next version.

Member

liZe commented Nov 15, 2017

@liZe I'm also facing with same bug. Is fixed version released?

No, it's not released yet, there's a couple of issues I'd like to fix before the next version.

@djKooks

This comment has been minimized.

Show comment
Hide comment
@djKooks

djKooks Nov 15, 2017

@liZe Okay, thanks. Is the fix commit merged in master?

djKooks commented Nov 15, 2017

@liZe Okay, thanks. Is the fix commit merged in master?

@liZe

This comment has been minimized.

Show comment
Hide comment
@liZe

liZe Nov 16, 2017

Member

Is the fix commit merged in master?

Yes, it is.

Member

liZe commented Nov 16, 2017

Is the fix commit merged in master?

Yes, it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment