summaryrefslogtreecommitdiff
path: root/scss/values/spacing
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+joeacarstairs@users.noreply.github.com>2024-10-05 17:27:40 +0100
committerGitHub <noreply@github.com>2024-10-05 17:27:40 +0100
commit2febffe5e3036c4b35dff4a8b274f42a7f8fef42 (patch)
tree7287800600f340871620631b8431cef37fc58891 /scss/values/spacing
parent285023b7c6bac87e049df0d8040ecd8f4a16ae78 (diff)
parentfdf28cb097596159a002326823f374a64e95c23c (diff)
Merge pull request #103 from joeacarstairs/staging
Update prod
Diffstat (limited to 'scss/values/spacing')
-rw-r--r--scss/values/spacing/_constants.scss23
-rw-r--r--scss/values/spacing/_grid.scss6
-rw-r--r--scss/values/spacing/_index.scss1
-rw-r--r--scss/values/spacing/_spacing.scss12
4 files changed, 19 insertions, 23 deletions
diff --git a/scss/values/spacing/_constants.scss b/scss/values/spacing/_constants.scss
index c89fdc8..3663bf3 100644
--- a/scss/values/spacing/_constants.scss
+++ b/scss/values/spacing/_constants.scss
@@ -8,7 +8,7 @@ $grid-padding-er: (
'md': 16,
'sm': 12,
'xs': 4,
- 'initial': 1
+ 'initial': 1,
);
$grid-column-count: (
@@ -18,7 +18,7 @@ $grid-column-count: (
'md': 8,
'sm': 8,
'xs': 4,
- 'initial': 1
+ 'initial': 1,
);
$grid-prose-column-count: (
@@ -28,7 +28,7 @@ $grid-prose-column-count: (
'md': 8,
'sm': 8,
'xs': 4,
- 'initial': 1
+ 'initial': 1,
);
$grid-padding-er: (
@@ -38,12 +38,20 @@ $grid-padding-er: (
'md': 16,
'sm': 12,
'xs': 4,
- 'initial': 1
+ 'initial': 1,
);
$spacing-factor: (
- 'inline': (lg: 12, md: 6, sm: 3),
- 'block': (lg: 16, md: 10, sm: 5)
+ 'inline': (
+ lg: 12,
+ md: 6,
+ sm: 3,
+ ),
+ 'block': (
+ lg: 16,
+ md: 10,
+ sm: 5,
+ ),
);
$grid-min-total-width-absolute: (
@@ -53,6 +61,5 @@ $grid-min-total-width-absolute: (
'md': 48rem,
'sm': 30rem,
'xs': 100vw,
- 'initial': 100vw
+ 'initial': 100vw,
);
-
diff --git a/scss/values/spacing/_grid.scss b/scss/values/spacing/_grid.scss
index 50d11c9..e448363 100644
--- a/scss/values/spacing/_grid.scss
+++ b/scss/values/spacing/_grid.scss
@@ -54,10 +54,6 @@
* module you'd end up with a circular dependency.
*/
@function er-to-absolute($length-er, $breakpoint: initial) {
- $absolute-per-er: calc(
- total-width-absolute($breakpoint)
- / total-width-er($breakpoint)
- );
+ $absolute-per-er: calc(total-width-absolute($breakpoint) / total-width-er($breakpoint));
@return calc($length-er * $absolute-per-er);
}
-
diff --git a/scss/values/spacing/_index.scss b/scss/values/spacing/_index.scss
index 8f8a454..1d65bb5 100644
--- a/scss/values/spacing/_index.scss
+++ b/scss/values/spacing/_index.scss
@@ -21,4 +21,3 @@
@forward 'grid' as grid-* hide er-to-absolute;
@forward 'grid' show er-to-absolute;
@forward 'spacing';
-
diff --git a/scss/values/spacing/_spacing.scss b/scss/values/spacing/_spacing.scss
index 4fd94e8..ac0d79e 100644
--- a/scss/values/spacing/_spacing.scss
+++ b/scss/values/spacing/_spacing.scss
@@ -9,24 +9,18 @@
* - direction: inline, block
*/
@function spacing($direction, $size, $breakpoint: initial) {
- $factor: map.get(
- map.get(constants.$spacing-factor, $direction),
- $size
- );
+ $factor: map.get(map.get(constants.$spacing-factor, $direction), $size);
@if list.index([xxl xl lg md sm], ($breakpoint)) {
@return grid.er-to-absolute($factor, $breakpoint);
- }
- @else if $breakpoint == xs {
+ } @else if $breakpoint == xs {
@return clamp(
spacing($direction, $size, initial),
grid.er-to-absolute($factor, xs),
spacing($direction, $size, sm)
);
- }
- @else if $breakpoint == initial {
+ } @else if $breakpoint == initial {
@return calc($factor * 0.0625rem);
}
@error "Invalid breakpoint: #{$breakpoint}";
}
-