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 print.css #95

Open
peterdesmet opened this issue Nov 2, 2023 · 1 comment
Open

Add print.css #95

peterdesmet opened this issue Nov 2, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@peterdesmet
Copy link
Owner

As reported by tdwg/website#524, more could be done to make Petridish websites print friendly. There are two main approaches:

  1. Add a assets/css/print.css (or scss) and call it in head with:
<link rel="stylesheet" media="print" href="{{ '/assets/theme/css/print.css' | relative_url }}">

Use https://tdwg.github.io/ltc/static/custom/css/print.css as inspiration. The advantage is that all print related elements are together. The disadvantage is that when updating a certain element (like the navbar), it is easy to forget the print related changes too.

  1. Add @media print rules in context:
/* override styles when printing */
@media print {

  body {
    margin: 0;
    color: #000;
    background-color: #fff;
  }
}

The advantage is that all css is kept in context.

I think I prefer the latter approach. If done so, than efb9a64 could be updated to make use of @media elements.

@peterdesmet peterdesmet added the enhancement New feature or request label Nov 2, 2023
@peterdesmet peterdesmet self-assigned this Nov 2, 2023
@ben-norton
Copy link

I think either solution works. Since you are the person that will be completing the task, you should be able to chose your preferred solution.
:)

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

No branches or pull requests

2 participants