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

Fix token build breakpoints #1012

Merged
merged 2 commits into from
Sep 9, 2024
Merged

Conversation

spiess-demos
Copy link
Contributor

This fix is also applied to the 0.3.x branch in #1011

We cannot use Css variables within media queries. As we do not need to override breakpoints anyway, at least for now, the primitive px value is taken instead.

The change leads to the file tokens/dist/tailwind/breakpoints.js looking like this:

module.exports = {
  "sm": "620px",
  "md": "904px",
  "lg": "1200px",
  "xl": "1400px"
};

instead of this:

module.exports = {
  "sm": "var(--dp-breakpoints-sm, 620px)",
  "md": "var(--dp-breakpoints-md, 904px)",
  "lg": "var(--dp-breakpoints-lg, 1200px)",
  "xl": "var(--dp-breakpoints-xl, 1400px)"
};

We cannot use Css variables within media queries.
As we do not need to override breakpoints anyway,
at least for now, the primitive px value is taken instead.
Copy link
Contributor

@sakutademos sakutademos left a comment

Choose a reason for hiding this comment

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

it works, lgtm!

@spiess-demos spiess-demos merged commit bbb94e1 into main Sep 9, 2024
1 check passed
@spiess-demos spiess-demos deleted the b_fix-token-build-breakpoints_main branch September 9, 2024 06:28
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.

2 participants