Skip to content
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

Add support for paged media with @page at-rule #207

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

prestancedesign
Copy link
Contributor

@prestancedesign prestancedesign commented Dec 19, 2023

Hi,

I contribute with this PR to add @page at-rule syntax:
https://developer.mozilla.org/en-US/docs/Web/CSS/@page

Firstly, this adds support for this specific case:

@page {
  /* margin box at top right showing page number */
  @top-right {
    content: "Page " counter(pageNumber);
  }
}

If interested, I'll also add the support of pseudo-classes.

/* Targets all even-numbered pages */
@page :left {
  margin-top: 4in;
}

Best regards.
Mike

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant