Skip to content

Commit

Permalink
fix(dep): include missing dep, small grid fix (#10962)
Browse files Browse the repository at this point in the history
* fix(dep): include missing dep, small grid fix

* fix(grid): proper config for grid breakpoints and config

Co-authored-by: TJ Egan <tw15egan@gmail.com>
  • Loading branch information
tay1orjones and tw15egan committed Mar 11, 2022
1 parent 05b57e9 commit d5ebf7b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
3 changes: 2 additions & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
"prop-types": "^15.7.2",
"react-is": "^17.0.2",
"use-resize-observer": "^6.0.0",
"wicg-inert": "^3.1.1"
"wicg-inert": "^3.1.1",
"window-or-global": "^1.0.1"
},
"devDependencies": {
"@babel/cli": "^7.16.7",
Expand Down
13 changes: 9 additions & 4 deletions packages/type/scss/modules/_styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

@use 'sass:map';
@use 'sass:math';
@use '@carbon/grid/scss/modules/config' as grid;
@use '@carbon/grid/scss/modules/config' as gridconfig;
@use '@carbon/grid/scss/modules/breakpoint' as grid;
@use 'font-family';
@use 'scale';

Expand Down Expand Up @@ -716,7 +717,7 @@ $tokens: (
/// @param {Map} $breakpoints [$grid-breakpoints] - Custom breakpoints to use
/// @access public
/// @group @carbon/type
@mixin fluid-type($type-styles, $breakpoints: grid.$grid-breakpoints) {
@mixin fluid-type($type-styles, $breakpoints: gridconfig.$grid-breakpoints) {
// Include the initial styles for the given token by default without any
// media query guard. This includes `font-size` as a fallback in the case
// that a browser does not support `calc()`
Expand Down Expand Up @@ -745,7 +746,7 @@ $tokens: (
@mixin fluid-type-size(
$type-styles,
$name,
$breakpoints: grid.$grid-breakpoints
$breakpoints: gridconfig.$grid-breakpoints
) {
// Get the information about the breakpoint we're currently working in. Useful
// for getting initial width information
Expand Down Expand Up @@ -846,7 +847,11 @@ $custom-property-prefix: 'cds' !default;
/// @param {Map} $breakpoints [$grid-breakpoints] - Provide a custom breakpoint map to use
/// @access public
/// @group @carbon/type
@mixin type-style($name, $fluid: false, $breakpoints: grid.$grid-breakpoints) {
@mixin type-style(
$name,
$fluid: false,
$breakpoints: gridconfig.$grid-breakpoints
) {
@if not map.has-key($tokens, $name) {
@error 'Unable to find a token with the name: `#{$name}`';
}
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11794,6 +11794,7 @@ __metadata:
webpack-dev-server: ^4.6.0
whatwg-fetch: ^3.6.2
wicg-inert: ^3.1.1
window-or-global: ^1.0.1
peerDependencies:
carbon-components: ^10.30.0
carbon-icons: ^7.0.7
Expand Down

0 comments on commit d5ebf7b

Please sign in to comment.