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

Support Paged Media #137

Closed
dbaynard opened this issue May 9, 2017 · 8 comments
Closed

Support Paged Media #137

dbaynard opened this issue May 9, 2017 · 8 comments

Comments

@dbaynard
Copy link
Contributor

dbaynard commented May 9, 2017

Hello,

Clay is already nearly there when it comes to supporting paged media, for use with @media print in browsers or dedicated typesetters such as Prince.

Many of the changes are simply adding combinators; a suitable Clay.Paged module might be suitable.

One change is more substantial. @page queries can take nested css, like @media queries. For example, the following displays the line "This page is intentionally left blank" at the top of any page which has the associated pseudo-selector blank.

@page :blank {
  @top-center { content: "This page is intentionally left blank." }
}

It looks like extending, replacing or complementing the query functions to handle more than just media queries would be the best way to go about implementing this. As it stands my workaround involves wrapping the @top-center { … } using a monster regular expression in vim.

It would be good to fully support the CSS paged media spec. How would this best be done?


See https://www.smashingmagazine.com/2015/01/designing-for-print-with-css/ for a good description of the capabilities.

@dbaynard
Copy link
Contributor Author

Would a PR with Clay.Paged be an acceptable addition to the API?

How about adding the function implementing the @page functionality?

@seanparsons
Copy link
Contributor

That sounds like a reasonable approach.

@turion
Copy link
Collaborator

turion commented Nov 17, 2019

@dbaynard do you want to create a PR?

@github-actions
Copy link

Stale issue message

@JonathanReeve
Copy link

Any progress on this? This would be really nice to have.

@turion
Copy link
Collaborator

turion commented Feb 26, 2020

@JonathanReeve If someone creates a PR I'll review and merge.

@dbaynard are you still interested?

@github-actions
Copy link

github-actions bot commented Apr 2, 2021

This issue has not seen any activity in a long time. If no further activity occurs, it will be closed after ten weeks.

@dbaynard
Copy link
Contributor Author

dbaynard commented May 4, 2021

Hello, please forgive my delay. I was keen in 2017; I'm now not sure I'll be using clay, in future. It looks like I should respond on #173, first; if that is a positive experience all round, I'll put together a plan, at least, for this feature.

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

No branches or pull requests

4 participants