Skip to content
This repository was archived by the owner on Jul 18, 2024. It is now read-only.

Commit f2918eb

Browse files
author
Jen Downs
committed
fix(variables): Updated variables in get-fixed-size: is passed in, is the base unit.
1 parent f2d8073 commit f2918eb

File tree

7 files changed

+32
-32
lines changed

7 files changed

+32
-32
lines changed
Binary file not shown.

examples/bootstrap/css-gridish/scss/_utilities.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
}
7272

7373
/// Function gets a calculated rem value for a fixed size.
74-
/// @param {Number} $fixedUnit Fixed nondimensional units.
74+
/// @param {Number} $unitQuantity Fixed nondimensional units.
7575
/// @return {Length} A calculated rem value.
7676
/// @example scss
7777
/// button {
@@ -85,19 +85,19 @@
8585
/// max-width: 5rem;
8686
/// }
8787
/// }
88-
@function get-fixed-size($fixedUnit) {
88+
@function get-fixed-size($unitQuantity) {
8989
// Derive the base unit from the current row height of the grid
90-
$baseline: map-get($grid-values, "rowHeight");
90+
$fixedUnit: map-get($grid-values, "rowHeight");
9191

92-
@if ($baseline == null or type-of($baseline) != "number") {
93-
@error "The baseline in $grid-values needs be a valid number. Please check your grid configuration.";
92+
@if ($fixedUnit == null or type-of($fixedUnit) != "number") {
93+
@error "The rowHeight in $grid-values needs be a valid number. Please check your grid configuration.";
9494
}
9595

96-
@if ($fixedUnit == null or type-of($fixedUnit) != "number") {
97-
@error "The provided fixed value `#{$fixedUnit}` to get-fixed-size() needs to be a valid number greater than 0.";
96+
@if ($unitQuantity == null or type-of($unitQuantity) != "number") {
97+
@error "The provided fixed value `#{$unitQuantity}` to get-fixed-size() needs to be a valid number greater than 0.";
9898
}
9999

100-
@return $fixedUnit * $baseline * 1rem;
100+
@return $unitQuantity * $fixedUnit * 1rem;
101101
}
102102

103103
/// Utility for declaring mobile-first media queries.
0 Bytes
Binary file not shown.

examples/carbon/css-gridish/scss/_utilities.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
}
7272

7373
/// Function gets a calculated rem value for a fixed size.
74-
/// @param {Number} $fixedUnit Fixed nondimensional units.
74+
/// @param {Number} $unitQuantity Fixed nondimensional units.
7575
/// @return {Length} A calculated rem value.
7676
/// @example scss
7777
/// button {
@@ -85,19 +85,19 @@
8585
/// max-width: 5rem;
8686
/// }
8787
/// }
88-
@function get-fixed-size($fixedUnit) {
88+
@function get-fixed-size($unitQuantity) {
8989
// Derive the base unit from the current row height of the grid
90-
$baseline: map-get($grid-values, "rowHeight");
90+
$fixedUnit: map-get($grid-values, "rowHeight");
9191

92-
@if ($baseline == null or type-of($baseline) != "number") {
93-
@error "The baseline in $grid-values needs be a valid number. Please check your grid configuration.";
92+
@if ($fixedUnit == null or type-of($fixedUnit) != "number") {
93+
@error "The rowHeight in $grid-values needs be a valid number. Please check your grid configuration.";
9494
}
9595

96-
@if ($fixedUnit == null or type-of($fixedUnit) != "number") {
97-
@error "The provided fixed value `#{$fixedUnit}` to get-fixed-size() needs to be a valid number greater than 0.";
96+
@if ($unitQuantity == null or type-of($unitQuantity) != "number") {
97+
@error "The provided fixed value `#{$unitQuantity}` to get-fixed-size() needs to be a valid number greater than 0.";
9898
}
9999

100-
@return $fixedUnit * $baseline * 1rem;
100+
@return $unitQuantity * $fixedUnit * 1rem;
101101
}
102102

103103
/// Utility for declaring mobile-first media queries.
Binary file not shown.

examples/material/css-gridish/scss/_utilities.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
}
7272

7373
/// Function gets a calculated rem value for a fixed size.
74-
/// @param {Number} $fixedUnit Fixed nondimensional units.
74+
/// @param {Number} $unitQuantity Fixed nondimensional units.
7575
/// @return {Length} A calculated rem value.
7676
/// @example scss
7777
/// button {
@@ -85,19 +85,19 @@
8585
/// max-width: 5rem;
8686
/// }
8787
/// }
88-
@function get-fixed-size($fixedUnit) {
88+
@function get-fixed-size($unitQuantity) {
8989
// Derive the base unit from the current row height of the grid
90-
$baseline: map-get($grid-values, "rowHeight");
90+
$fixedUnit: map-get($grid-values, "rowHeight");
9191

92-
@if ($baseline == null or type-of($baseline) != "number") {
93-
@error "The baseline in $grid-values needs be a valid number. Please check your grid configuration.";
92+
@if ($fixedUnit == null or type-of($fixedUnit) != "number") {
93+
@error "The rowHeight in $grid-values needs be a valid number. Please check your grid configuration.";
9494
}
9595

96-
@if ($fixedUnit == null or type-of($fixedUnit) != "number") {
97-
@error "The provided fixed value `#{$fixedUnit}` to get-fixed-size() needs to be a valid number greater than 0.";
96+
@if ($unitQuantity == null or type-of($unitQuantity) != "number") {
97+
@error "The provided fixed value `#{$unitQuantity}` to get-fixed-size() needs to be a valid number greater than 0.";
9898
}
9999

100-
@return $fixedUnit * $baseline * 1rem;
100+
@return $unitQuantity * $fixedUnit * 1rem;
101101
}
102102

103103
/// Utility for declaring mobile-first media queries.

src/scss/_utilities.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
}
7272

7373
/// Function gets a calculated rem value for a fixed size.
74-
/// @param {Number} $fixedUnit Fixed nondimensional units.
74+
/// @param {Number} $unitQuantity Fixed nondimensional units.
7575
/// @return {Length} A calculated rem value.
7676
/// @example scss
7777
/// button {
@@ -85,19 +85,19 @@
8585
/// max-width: 5rem;
8686
/// }
8787
/// }
88-
@function get-fixed-size($fixedUnit) {
88+
@function get-fixed-size($unitQuantity) {
8989
// Derive the base unit from the current row height of the grid
90-
$baseline: map-get($grid-values, "rowHeight");
90+
$fixedUnit: map-get($grid-values, "rowHeight");
9191

92-
@if ($baseline == null or type-of($baseline) != "number") {
93-
@error "The baseline in $grid-values needs be a valid number. Please check your grid configuration.";
92+
@if ($fixedUnit == null or type-of($fixedUnit) != "number") {
93+
@error "The rowHeight in $grid-values needs be a valid number. Please check your grid configuration.";
9494
}
9595

96-
@if ($fixedUnit == null or type-of($fixedUnit) != "number") {
97-
@error "The provided fixed value `#{$fixedUnit}` to get-fixed-size() needs to be a valid number greater than 0.";
96+
@if ($unitQuantity == null or type-of($unitQuantity) != "number") {
97+
@error "The provided fixed value `#{$unitQuantity}` to get-fixed-size() needs to be a valid number greater than 0.";
9898
}
9999

100-
@return $fixedUnit * $baseline * 1rem;
100+
@return $unitQuantity * $fixedUnit * 1rem;
101101
}
102102

103103
/// Utility for declaring mobile-first media queries.

0 commit comments

Comments
 (0)