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

feat(ras-acc): update Newspack UI variable font sizes for the theme #2296

Merged
merged 2 commits into from
May 17, 2024

Conversation

laurelfulford
Copy link
Contributor

@laurelfulford laurelfulford commented May 16, 2024

All Submissions:

Changes proposed in this Pull Request:

This PR updates the Newspack UI font size variable values so the clamp sizes are calculated based off of the classic theme's 18px and 20px font sizes. The sizes in the Newspack Plugin are correct for a 16px font size base (which will match our block theme), but the classic theme has font sizes that are slightly larger so it's been messing up the end result.

Note: I set the max screen size for the font sizes to 1600px and the min screen size to 600px -- I think this is right based off the sizes coming from Newspack UI, but let me know if it's not!

How to test the changes in this Pull Request:

  1. Apply this PR to the theme and run npm run build.
  2. Check out the epic/ras-acc branch on the Newspack Plugin, and run npm run build.
  3. View the Newspack UI Demo (?ui-demo) and check the computed size of the font examples, from size medium and up. They should match these pixel sizes, with the lowest being for screens less than 600px wide, and the highest being for screen sizes 1600px or wider:
  • Medium: 18px - 20px
  • Large: 20px - 24px
  • X-Large: 22px - 32px
  • 2 X-Large: 26px - 42px
  • 3 X-Large: 28px - 48px
  • 4 X-Large: 32px - 64px
  • 5 X-Large: 34px - 80px
  • 6 X-Large: 36px - 96px

image

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@laurelfulford laurelfulford added [Status] Needs Review The issue or pull request needs to be reviewed [Status] Needs Design Review labels May 16, 2024
@laurelfulford laurelfulford requested a review from a team as a code owner May 16, 2024 19:29
@github-actions github-actions bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels May 16, 2024
@thomasguillot
Copy link
Contributor

@laurelfulford would you mind re-testing this PR before merging it to make sure I didn't break everything 😅? I've updated the viewport range (782 -> 1280).

@laurelfulford
Copy link
Contributor Author

@thomasguillot I retested and everything looks good! Thanks for correcting my breakpoints 😄

And thanks for the initial review, @dkoo! This change seems super low-risk (it doesn't touch anything in the actual theme, it just uses it to override styles in some in-progress work), I'm going to go ahead and merge this into the epic/ras-acc branch!

@laurelfulford laurelfulford merged commit 0118653 into epic/ras-acc May 17, 2024
3 checks passed
@laurelfulford laurelfulford deleted the feat/override-font-sizes branch May 17, 2024 17:27
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.89.0-epic-ras-acc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.91.0-epic-ras-acc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.92.0-epic-ras-acc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.93.0-epic-ras-acc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@matticbot
Copy link
Contributor

🎉 This PR is included in version 2.1.0-epic-ras-acc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@matticbot
Copy link
Contributor

🎉 This PR is included in version 2.3.0-epic-ras-acc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@matticbot
Copy link
Contributor

🎉 This PR is included in version 2.4.0-epic-ras-acc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released on @epic/ras-acc [Status] Approved The pull request has been reviewed and is ready to merge [Status] Needs Design Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants