Skip to content

Commit

Permalink
Merge pull request #4444 from grommet/fix/breakpoints
Browse files Browse the repository at this point in the history
Fix breakpoints output
  • Loading branch information
taysea authored Nov 21, 2024
2 parents 1e121a9 + 4acbe0e commit 9b008f7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
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

0 comments on commit 9b008f7

Please sign in to comment.