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

Update and/or add component print styles #4073

Merged
merged 22 commits into from
Aug 22, 2024
Merged

Conversation

matthillco
Copy link
Contributor

@matthillco matthillco commented Jun 21, 2024

What

This PR updates the print styles for any public-facing components. The changes broadly fall into these categories:

  • hiding/removing components that should never be printed
  • improving components that already have print styles
  • creating print styles for components that don't already have them

Trello card

Why

People still print a lot of pages from GOV.UK. And recent discussions have highlighted potential problems, or at least a perception that HTML pages when printed aren't as good as PDFs. We're trying to move away from/discourage the use of PDFs on GOV.UK, so improving the print experience could help.

Visual Changes

There are too many differences to include all before/after shots here. Changes will be reviewed with a designer before deployment.

@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4073 June 21, 2024 14:40 Inactive
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4073 June 25, 2024 10:38 Inactive
@matthillco matthillco force-pushed the update-component-print-styles branch from 5e63d9f to 06cf355 Compare June 25, 2024 10:40
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4073 June 25, 2024 10:40 Inactive
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4073 June 25, 2024 10:57 Inactive
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4073 June 25, 2024 12:05 Inactive
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4073 June 25, 2024 14:28 Inactive
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4073 June 25, 2024 14:46 Inactive
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4073 June 25, 2024 16:01 Inactive
@matthillco matthillco force-pushed the update-component-print-styles branch from 930c3b8 to f63e290 Compare June 25, 2024 16:02
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4073 June 25, 2024 16:02 Inactive
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4073 June 26, 2024 15:50 Inactive
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4073 June 28, 2024 16:00 Inactive
@matthillco matthillco force-pushed the update-component-print-styles branch from c851c24 to ad211df Compare July 15, 2024 12:20
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4073 July 15, 2024 12:20 Inactive
@matthillco matthillco marked this pull request as ready for review July 15, 2024 14:12
@matthillco
Copy link
Contributor Author

Note that while this can be code reviewed, it has not yet been design reviewed (which may produce further code changes).

@matthillco matthillco force-pushed the update-component-print-styles branch from ad211df to e47eaa8 Compare July 23, 2024 11:29
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4073 July 23, 2024 11:29 Inactive
@AshGDS AshGDS self-requested a review July 24, 2024 09:43
Copy link
Contributor

@AshGDS AshGDS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, nice work 👍 I've added some comments but overall it looks good.

@matthillco matthillco force-pushed the update-component-print-styles branch from e47eaa8 to 61584ff Compare July 30, 2024 09:57
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4073 July 30, 2024 09:58 Inactive
@matthillco matthillco force-pushed the update-component-print-styles branch from 61584ff to 6fae083 Compare July 30, 2024 10:08
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4073 July 30, 2024 10:08 Inactive
@matthillco matthillco force-pushed the update-component-print-styles branch from 6fae083 to 91197ce Compare July 30, 2024 10:50
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4073 July 30, 2024 10:50 Inactive
- Add individual_component_support to allow `govuk-media-query` to work
- Set printed url to inherit parent font-size. This component can have different text sizes depending on how it’s used and the printed url should follow the same text size.
- Set printed url to inherit parent colour. This ensures we print in black which has better printed contrast than blue and is potentially cheaper (black ink is cheaper than mixing colour inks).
- colours now print black on white
- remove all auto margins to improve layout
- remove unnecessary padding
- improve border styling for print
- remove all links
@matthillco matthillco force-pushed the update-component-print-styles branch from dc11505 to a0e35b0 Compare August 22, 2024 10:00
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4073 August 22, 2024 10:01 Inactive
@matthillco matthillco merged commit e1d163a into main Aug 22, 2024
12 checks passed
@matthillco matthillco deleted the update-component-print-styles branch August 22, 2024 10:04
@andysellick andysellick mentioned this pull request Aug 22, 2024
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.

4 participants