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 breakpoints output #4444

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/heavy-books-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hpe-design-tokens": minor
---

Remove media query from CSS output for dimension.medium.css
4 changes: 2 additions & 2 deletions design-tokens/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ npm i hpe-design-tokens

## Usage

For usage instructions, see [HPE Design System design tokens documentation](https://design-system.hpe.design/tokens).
For usage instructions, see [HPE Design System design tokens documentation](https://design-system.hpe.design/design-tokens).

## License

[Apache-2.0](https://github.com/grommet/hpe-design-system/blob/design-tokens-alpha/design-tokens/LICENSE)
[Apache-2.0](https://github.com/grommet/hpe-design-system/blob/design-tokens-stable/LICENSE)
2 changes: 1 addition & 1 deletion design-tokens/src/scripts/build-style-dictionary.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ try {
outputReferences: true,
mediaQuery:
parsedGlobal.breakpoint?.[mode] &&
!['large', 'xlarge'].includes(mode) &&
!['medium', 'large', 'xlarge'].includes(mode) &&
`max-width: ${numberToPixel(
parsedGlobal.breakpoint[mode].$value,
)}`,
Expand Down
8 changes: 4 additions & 4 deletions sandbox/grommet-app/src/theme.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ const buildTheme = tokens => {
xxlarge: small.hpe.size.content.xxlarge,
full: '100%',
},
value: global.hpe.breakpoint.xsmall,
value: parseInt(global.hpe.breakpoint.xsmall, 10),
},
small: {
borderSize: {
Expand Down Expand Up @@ -473,13 +473,13 @@ const buildTheme = tokens => {
xxlarge: small.hpe.size.content.xxlarge,
full: '100%',
},
value: global.hpe.breakpoint.small,
value: parseInt(global.hpe.breakpoint.small, 10),
},
medium: {
value: global.hpe.breakpoint.medium,
value: parseInt(global.hpe.breakpoint.medium, 10),
},
large: {
value: global.hpe.breakpoint.large,
value: parseInt(global.hpe.breakpoint.large, 10),
},
xlarge: {},
},
Expand Down
Loading