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

Fallbacks for postCss #654

Merged
merged 3 commits into from
May 16, 2023
Merged

Fallbacks for postCss #654

merged 3 commits into from
May 16, 2023

Conversation

lukasoppermann
Copy link
Contributor

@lukasoppermann lukasoppermann commented May 14, 2023

Summary

This adds the fallback json files for PostCss

Output

All files are output as they are apart from color, which are combined to themes.

E.g.

  • base/size/size.json
  • base/typography/typography.json
  • functional/size/border.json

base/size.json

{
  "--base-size-4": "0.25rem",
  "--base-size-8": "0.5rem",
  "--base-size-12": "0.75rem",
  "--base-size-16": "1rem",
  "--base-size-20": "1.25rem",
  "--base-size-24": "1.5rem",
  "--base-size-28": "1.75rem",
  "--base-size-32": "2rem",
  "--base-size-36": "2.25rem",
  "--base-size-40": "2.5rem",
  "--base-size-44": "2.75rem",
  "--base-size-48": "3rem",
  "--base-size-64": "4rem",
  "--base-size-80": "5rem",
  "--base-size-96": "6rem",
  "--base-size-112": "7rem",
  "--base-size-128": "8rem"
}

Questions

  • is this the output we need? @langermank
  • Do we really not want colors? Why @langermank? If so, I will remove this from the output.

@lukasoppermann lukasoppermann requested a review from a team as a code owner May 14, 2023 19:49
@lukasoppermann lukasoppermann requested review from a team, rezrah and joshblack May 14, 2023 19:49
@changeset-bot
Copy link

changeset-bot bot commented May 14, 2023

🦋 Changeset detected

Latest commit: be483ee

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/primitives Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@lukasoppermann lukasoppermann requested review from langermank and removed request for rezrah May 14, 2023 19:49
@github-actions
Copy link
Contributor

github-actions bot commented May 14, 2023

Variables changed
No variables changed

@lukasoppermann lukasoppermann temporarily deployed to github-pages May 14, 2023 19:54 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview May 14, 2023 19:54 Inactive
@lukasoppermann lukasoppermann temporarily deployed to github-pages May 15, 2023 06:00 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview May 15, 2023 06:00 Inactive
@lukasoppermann lukasoppermann self-assigned this May 15, 2023
Copy link
Contributor

@langermank langermank left a comment

Choose a reason for hiding this comment

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

This is AMAZING! THANK YOU!

I don't mind if you want to leave the color files in, but we won't use it for now. We only need color fallbacks to test the new color tokens against the existing tokens, meaning we use another CSS var in the fallback instead of a raw value.

To use raw colors, we would need to configure the PostCSS plugin to respect themes. I don't think we need that right now :)

@lukasoppermann
Copy link
Contributor Author

@langermank in this case I will see if I can easily remove colors (should be fine). I am not a big fan of adding unused files. 👍

@github-actions github-actions bot temporarily deployed to storybook-preview May 16, 2023 19:27 Inactive
@lukasoppermann lukasoppermann merged commit 67bf5c0 into main May 16, 2023
@lukasoppermann lukasoppermann deleted the postCss-fallback branch May 16, 2023 19:29
@primer-css primer-css mentioned this pull request May 16, 2023
langermank pushed a commit that referenced this pull request Jun 1, 2023
* fallbacks for postCss

* added changeset

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

Successfully merging this pull request may close these issues.

2 participants