This repository was archived by the owner on Jul 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +15
-12
lines changed
Expand file tree Collapse file tree 6 files changed +15
-12
lines changed Original file line number Diff line number Diff line change 8686/// }
8787/// }
8888@function get-fixed-size ($fixedUnit ) {
89- $rowHeight : map-get ($grid-values , " rowHeight" );
89+ // Derive the base unit from the current row height of the grid
90+ $baseline : map-get ($grid-values , " rowHeight" );
9091
91- @if ($rowHeight == null or type-of ($rowHeight ) != " number" ) {
92- @error " The rowHeight in $grid-values needs be a valid number. Please check your grid configuration." ;
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." ;
9394 }
9495
9596 @if ($fixedUnit == null or type-of ($fixedUnit ) != " number" ) {
9697 @error " The provided fixed value `#{$fixedUnit } ` to get-fixed-size() needs to be a valid number greater than 0." ;
9798 }
9899
99- @return $fixedUnit * $rowHeight * 1rem ;
100+ @return $fixedUnit * $baseline * 1rem ;
100101}
101102
102103/// Utility for declaring mobile-first media queries.
Original file line number Diff line number Diff line change 8686/// }
8787/// }
8888@function get-fixed-size ($fixedUnit ) {
89- $rowHeight : map-get ($grid-values , " rowHeight" );
89+ // Derive the base unit from the current row height of the grid
90+ $baseline : map-get ($grid-values , " rowHeight" );
9091
91- @if ($rowHeight == null or type-of ($rowHeight ) != " number" ) {
92- @error " The rowHeight in $grid-values needs be a valid number. Please check your grid configuration." ;
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." ;
9394 }
9495
9596 @if ($fixedUnit == null or type-of ($fixedUnit ) != " number" ) {
9697 @error " The provided fixed value `#{$fixedUnit } ` to get-fixed-size() needs to be a valid number greater than 0." ;
9798 }
9899
99- @return $fixedUnit * $rowHeight * 1rem ;
100+ @return $fixedUnit * $baseline * 1rem ;
100101}
101102
102103/// Utility for declaring mobile-first media queries.
Original file line number Diff line number Diff line change 8686/// }
8787/// }
8888@function get-fixed-size ($fixedUnit ) {
89- $rowHeight : map-get ($grid-values , " rowHeight" );
89+ // Derive the base unit from the current row height of the grid
90+ $baseline : map-get ($grid-values , " rowHeight" );
9091
91- @if ($rowHeight == null or type-of ($rowHeight ) != " number" ) {
92- @error " The rowHeight in $grid-values needs be a valid number. Please check your grid configuration." ;
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." ;
9394 }
9495
9596 @if ($fixedUnit == null or type-of ($fixedUnit ) != " number" ) {
9697 @error " The provided fixed value `#{$fixedUnit } ` to get-fixed-size() needs to be a valid number greater than 0." ;
9798 }
9899
99- @return $fixedUnit * $rowHeight * 1rem ;
100+ @return $fixedUnit * $baseline * 1rem ;
100101}
101102
102103/// Utility for declaring mobile-first media queries.
You can’t perform that action at this time.
0 commit comments