@bonniernews/dn-design-system-web 7.0.0 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/components/disclaimer/disclaimer.scss +3 -3
- package/components/teaser-split/teaser-split.scss +10 -10
- package/components/teaser-tipsa/teaser-tipsa.scss +2 -1
- package/foundations/cssVariables.scss +1 -0
- package/foundations/helpers/README-spacing.md +21 -73
- package/foundations/helpers/spacing-deprecated.scss +77 -0
- package/foundations/helpers/spacing.scss +41 -57
- package/foundations/spacing.scss +24 -0
- package/foundations/variables/spacingBase.scss +14 -0
- package/foundations/variables/spacingBaseList.scss +12 -0
- package/foundations/variables/spacingDetail.scss +15 -0
- package/foundations/variables/spacingDetailList.scss +13 -0
- package/foundations/variables/spacingDetailScreenLarge.scss +15 -0
- package/package.json +1 -1
- package/tokens/spacing-base-list.json +14 -0
- package/tokens/spacing-detail-list.json +15 -0
- /package/foundations/variables/{spacingComponent.scss → deprecated/spacingComponent.scss} +0 -0
- /package/foundations/variables/{spacingComponentList.scss → deprecated/spacingComponentList.scss} +0 -0
- /package/foundations/variables/{spacingLayout.scss → deprecated/spacingLayout.scss} +0 -0
- /package/foundations/variables/{spacingLayoutLargeScreen.scss → deprecated/spacingLayoutLargeScreen.scss} +0 -0
- /package/foundations/variables/{spacingLayoutList.scss → deprecated/spacingLayoutList.scss} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 7.1.0 (2023-10-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **web:** refactored spacing ([#1062](https://github.com/BonnierNews/dn-design-system/issues/1062)) ([6d76bc0](https://github.com/BonnierNews/dn-design-system/commit/6d76bc07dfb193333ebf841962e9a42560e77a74))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## 7.0.1 (2023-10-20)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **web:** correct spacing in TeaserTipsa ([#1058](https://github.com/BonnierNews/dn-design-system/issues/1058)) ([56a8865](https://github.com/BonnierNews/dn-design-system/commit/56a8865ae0cdf96a86e9c6f4f45fcc0a75104841))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## 7.0.0 (2023-10-11)
|
|
7
25
|
|
|
8
26
|
|
|
@@ -5,18 +5,18 @@ $ds-disclaimer__icon-size: 20px;
|
|
|
5
5
|
$ds-btn-outlined__border-width: ds-metrics-border-width(x1);
|
|
6
6
|
|
|
7
7
|
.ds-disclaimer {
|
|
8
|
-
|
|
8
|
+
padding-bottom: ds-spacing($ds-s-gap-vertical-static-medium);
|
|
9
9
|
box-sizing: border-box;
|
|
10
10
|
|
|
11
11
|
.ds-disclaimer__body-html,
|
|
12
12
|
.ds-disclaimer__icon-wrapper {
|
|
13
13
|
background-color: $ds-color-surface-raised;
|
|
14
|
-
padding: ds-spacing
|
|
14
|
+
padding: ds-spacing($ds-s-075 $ds-s-100);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.ds-disclaimer__icon-wrapper {
|
|
18
18
|
// instead of margin to keep background color
|
|
19
|
-
padding-right: ds-spacing
|
|
19
|
+
padding-right: ds-spacing($ds-s-050);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.ds-disclaimer__body-html {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
@use "../../assets/teaser/teaser.scss" as *;
|
|
3
3
|
|
|
4
4
|
.ds-split-container {
|
|
5
|
-
|
|
6
|
-
$ds-
|
|
5
|
+
padding: ds-spacing(
|
|
6
|
+
$ds-s-teaser-vertical-small $ds-s-teaser-horizontal
|
|
7
7
|
$ds-sl-teaser-vertical-medium
|
|
8
8
|
);
|
|
9
9
|
display: flex;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
right: 0;
|
|
22
22
|
top: 0;
|
|
23
23
|
position: absolute;
|
|
24
|
-
|
|
24
|
+
margin: ds-spacing(0 $ds-s-teaser-horizontal);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
display: block;
|
|
31
31
|
position: relative;
|
|
32
32
|
flex: 1;
|
|
33
|
-
margin-right: ds-spacing
|
|
33
|
+
margin-right: ds-spacing($ds-s-100);
|
|
34
34
|
&:last-child {
|
|
35
35
|
margin-right: 0;
|
|
36
36
|
}
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
@include ds-teaser-focus(4px);
|
|
39
39
|
|
|
40
40
|
@include ds-mq-largest-breakpoint(mobile) {
|
|
41
|
-
width: calc(50% - ds-spacing
|
|
41
|
+
width: calc(50% - ds-spacing($ds-s-100) / 2);
|
|
42
42
|
flex: auto;
|
|
43
43
|
// if a teaser is both third and last child it has the row by itself and should be full width
|
|
44
44
|
&:nth-child(3):last-child {
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
&:nth-child(4)::before {
|
|
54
54
|
display: block;
|
|
55
55
|
content: "";
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
margin-top: ds-spacing($ds-s-teaser-vertical-medium);
|
|
57
|
+
padding-top: ds-spacing($ds-s-teaser-vertical-small);
|
|
58
58
|
border-top: ds-metrics-border-width(x1) solid $ds-color-border-primary;
|
|
59
59
|
|
|
60
60
|
@include ds-mq-smallest-breakpoint(tablet) {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
&:nth-child(3):not(:last-child)::before {
|
|
68
|
-
margin-right: ds-spacing
|
|
68
|
+
margin-right: ds-spacing($ds-s-100, "px", true);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.ds-teaser__title {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
|
|
75
75
|
.ds-teaser__media {
|
|
76
76
|
@include ds-mq-largest-breakpoint(mobile) {
|
|
77
|
-
margin-bottom: ds-spacing
|
|
77
|
+
margin-bottom: ds-spacing($ds-s-050);
|
|
78
78
|
|
|
79
79
|
.ds-teaser-image__byline {
|
|
80
80
|
display: none;
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
@include ds-mq-smallest-breakpoint(tablet) {
|
|
85
|
-
margin-bottom: ds-spacing
|
|
85
|
+
margin-bottom: ds-spacing($ds-s-075);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -15,11 +15,12 @@
|
|
|
15
15
|
|
|
16
16
|
@include ds-hover(true) {
|
|
17
17
|
.ds-teaser__title {
|
|
18
|
-
@include ds-underline(2px,
|
|
18
|
+
@include ds-underline(2px, 2px);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.ds-teaser__text {
|
|
23
23
|
@include ds-typography($ds-typography-functional-body02regular);
|
|
24
|
+
margin-top: ds-spacing-component($ds-sc-x2);
|
|
24
25
|
}
|
|
25
26
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
- GitHub: [BonnierNews/dn-design-system/../web/src/foundations/helpers/spacing.scss](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/foundations/helpers/spacing.scss)
|
|
2
|
-
- Storybook: [Spacing >
|
|
3
|
-
- Storybook: [Spacing >
|
|
2
|
+
- Storybook: [Spacing > Base](https://designsystem.dn.se/?path=/story/foundations-spacing--base)
|
|
3
|
+
- Storybook: [Spacing > Detail](https://designsystem.dn.se/?path=/story/foundations-spacing--detail)
|
|
4
4
|
|
|
5
5
|
----
|
|
6
6
|
|
|
@@ -9,102 +9,50 @@
|
|
|
9
9
|
## use sass variable
|
|
10
10
|
To avoid silent breaking changes use sass variable instead of raw token name.
|
|
11
11
|
|
|
12
|
-
Ex: `margin: ds-spacing
|
|
13
|
-
|
|
14
|
-
Ex: `@include ds-spacing-layout($ds-sl-page-horizontal auto, padding-top)`
|
|
12
|
+
Ex: `margin: ds-spacing($ds-s-050 0 $ds-s-page-horizontal)`
|
|
15
13
|
|
|
16
14
|
By using sass variables (instead of token name directly), if a spacing token used in scss is removed sass will not compile - which is a good thing!
|
|
17
15
|
|
|
18
16
|
By using sass variables for spacing tokens you will see which tokens are available through auto complete.
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Variables with `$ds-sl-` prefix are available for `ds-spacing-layout()`
|
|
23
|
-
|
|
24
|
-
## ds-spacing-component | function
|
|
25
|
-
|
|
26
|
-
Use for space _inside_ a component (or atom).
|
|
27
|
-
|
|
28
|
-
Dynamic spacings are static and are _not_ wrapped in any media query, the function only return values.
|
|
18
|
+
## ds-spacing | function
|
|
29
19
|
|
|
30
20
|
### Parameters
|
|
31
21
|
|
|
32
22
|
|parameter | type | required | options | default | description |
|
|
33
23
|
|:--- | :--- | :--- | :--- | :--- | :--- |
|
|
34
|
-
|units | String | yes | one or more spacing tokens or `auto` or `0`
|
|
35
|
-
|sizeUnit | String | no | px, rem
|
|
24
|
+
|units | String | yes | one or more spacing tokens or `auto` or `0` or numeric value `14`| | $ds-s-050 0 $ds-s-page-horizontal 14 |
|
|
25
|
+
|sizeUnit | String | no | px, rem | px | |
|
|
36
26
|
|negative | bool | no | true, false | false | Applies to all units except for `auto` and `0` |
|
|
37
27
|
|
|
38
28
|
```scss
|
|
39
29
|
@use "@bonniernews/dn-design-system-web/foundations/helpers/forward.helpers.scss" as *;
|
|
40
30
|
|
|
41
31
|
.test-1 {
|
|
42
|
-
margin: ds-spacing
|
|
32
|
+
margin: ds-spacing($ds-s-050 0 $ds-s-page-horizontal auto);
|
|
33
|
+
padding: ds-spacing($ds-s-125 14);
|
|
43
34
|
}
|
|
44
35
|
|
|
45
36
|
// Outputs:
|
|
46
|
-
4px 8px 0
|
|
47
|
-
|
|
48
|
-
.test-2 {
|
|
49
|
-
margin: ds-spacing-component($ds-sc-x1 $ds-sc-x2 0, px, true);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// Outputs:
|
|
53
|
-
-4px -8px 0
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## ds-spacing-layout | mixin
|
|
57
|
-
|
|
58
|
-
Use for space _between_ components.
|
|
59
|
-
|
|
60
|
-
This mixin returns `property: value` wrapped in media query.
|
|
61
|
-
|
|
62
|
-
### Parameters
|
|
63
|
-
|
|
64
|
-
|parameter | type | required | options | default | description |
|
|
65
|
-
|:--- | :--- | :--- | :--- | :--- | :--- |
|
|
66
|
-
|units | String | yes | one or more spacing tokens or `auto` or `0` | | Ex. 0 page-horizontal |
|
|
67
|
-
|property | String | no | padding, margin | padding | Use padding for layout spacing to avoid collapsing margins|
|
|
68
|
-
|sizeUnit | String | no | px, rem, em | px | |
|
|
69
|
-
|negative | bool | no | true, false | false | Applies to all units except for `auto` and `0` |
|
|
70
|
-
|
|
71
|
-
```scss
|
|
72
|
-
@use "@bonniernews/dn-design-system-web/foundations/helpers/forward.helpers.scss" as *;
|
|
73
|
-
|
|
74
37
|
.test-1 {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
// Outputs:
|
|
79
|
-
@media (max-width: 1024px) {
|
|
80
|
-
.test-1 {
|
|
81
|
-
padding-top: 16px;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
@media (min-width: 1025px) {
|
|
85
|
-
.test-1 {
|
|
86
|
-
padding-top: 32px;
|
|
87
|
-
}
|
|
38
|
+
margin: 8px 0 var(--ds-spacing-px-page-horizontal) auto;
|
|
39
|
+
padding: 20px 14px;
|
|
88
40
|
}
|
|
89
41
|
|
|
90
42
|
.test-2 {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
margin,
|
|
94
|
-
px,
|
|
95
|
-
true
|
|
96
|
-
);
|
|
43
|
+
margin: ds-spacing($ds-s-050 0 $ds-s-page-horizontal auto, rem, true);
|
|
44
|
+
padding: ds-spacing($ds-s-125 14, rem);
|
|
97
45
|
}
|
|
98
46
|
|
|
99
47
|
// Outputs:
|
|
100
|
-
|
|
101
|
-
.
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
@media (min-width: 1025px) {
|
|
106
|
-
.test-2 {
|
|
107
|
-
margin: 0 -32px;
|
|
108
|
-
}
|
|
48
|
+
.test-2 {
|
|
49
|
+
margin: -0.5rem 0 var(--ds-spacing-negative-rem-page-horizontal) auto;
|
|
50
|
+
padding: 1.25rem 0.875rem;
|
|
109
51
|
}
|
|
110
52
|
```
|
|
53
|
+
|
|
54
|
+
## ⚠️ Deprecated functions and mixins
|
|
55
|
+
|
|
56
|
+
The function `ds-spacing-component()` is deprecated.
|
|
57
|
+
|
|
58
|
+
The mixin `@include ds-spacing-layout()` is deprecated.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
@use "sass:list";
|
|
2
|
+
@use "sass:math";
|
|
3
|
+
@use "sass:map";
|
|
4
|
+
@use "mediaQueries.scss" as *;
|
|
5
|
+
@use "../variables/deprecated/spacingComponent.scss" as *;
|
|
6
|
+
@use "../variables/deprecated/spacingLayout.scss" as *;
|
|
7
|
+
@use "../variables/deprecated/spacingLayoutLargeScreen.scss" as *;
|
|
8
|
+
@forward "../variables/deprecated/spacingComponentList.scss";
|
|
9
|
+
@forward "../variables/deprecated/spacingLayoutList.scss";
|
|
10
|
+
|
|
11
|
+
@function ds-spacing-component(
|
|
12
|
+
$units: null,
|
|
13
|
+
$sizeUnit: "px",
|
|
14
|
+
$negative: false
|
|
15
|
+
) {
|
|
16
|
+
@if $units {
|
|
17
|
+
@return _ds-get-spacings-deprecated($spacingComponent, $units, $sizeUnit, $negative);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@return null;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@mixin ds-spacing-layout(
|
|
24
|
+
$units: null,
|
|
25
|
+
$property: padding,
|
|
26
|
+
$sizeUnit: "px",
|
|
27
|
+
$negative: false
|
|
28
|
+
) {
|
|
29
|
+
@if $units {
|
|
30
|
+
$values: _ds-get-spacings-deprecated($spacingLayout, $units, $sizeUnit, $negative);
|
|
31
|
+
@include ds-mq-largest-breakpoint(mobile) {
|
|
32
|
+
#{$property}: $values;
|
|
33
|
+
}
|
|
34
|
+
$valuesLargeScreen: _ds-get-spacings-deprecated(
|
|
35
|
+
$spacingLayoutLargeScreen,
|
|
36
|
+
$units,
|
|
37
|
+
$sizeUnit,
|
|
38
|
+
$negative
|
|
39
|
+
);
|
|
40
|
+
@include ds-mq-smallest-breakpoint(tablet) {
|
|
41
|
+
#{$property}: $valuesLargeScreen;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@function _ds-get-spacings-deprecated($map, $units, $sizeUnit: "px", $negative: false) {
|
|
47
|
+
$values: ();
|
|
48
|
+
|
|
49
|
+
@each $unit in $units {
|
|
50
|
+
$value: map.get($map, $unit);
|
|
51
|
+
@if ($unit == "auto") {
|
|
52
|
+
$value: auto;
|
|
53
|
+
} @else if ($unit == 0) {
|
|
54
|
+
$value: 0 * 1;
|
|
55
|
+
} @else if ($value and type-of($value) == "number") {
|
|
56
|
+
@if ($sizeUnit == "rem") {
|
|
57
|
+
$value: (math.div($value, 16)) * 1rem;
|
|
58
|
+
} @else if ($sizeUnit == "em") {
|
|
59
|
+
$value: (math.div($value, 16)) * 1em;
|
|
60
|
+
} @else {
|
|
61
|
+
$value: $value * 1px;
|
|
62
|
+
}
|
|
63
|
+
@if $negative {
|
|
64
|
+
$value: $value * -1;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
@if (type-of($value) == "number" or $value == "auto") {
|
|
68
|
+
$values: list.append($values, $value);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@if length($values) == 1 {
|
|
73
|
+
@return list.nth($values, 1);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@return $values;
|
|
77
|
+
}
|
|
@@ -2,76 +2,60 @@
|
|
|
2
2
|
@use "sass:math";
|
|
3
3
|
@use "sass:map";
|
|
4
4
|
@use "mediaQueries.scss" as *;
|
|
5
|
-
@use "../variables/
|
|
6
|
-
@
|
|
7
|
-
@use "../variables/
|
|
8
|
-
@
|
|
9
|
-
@forward "../variables/
|
|
5
|
+
@use "../variables/spacingBase.scss" as *;
|
|
6
|
+
@forward "../variables/spacingBaseList.scss";
|
|
7
|
+
@use "../variables/spacingDetail.scss" as *;
|
|
8
|
+
@use "../variables/spacingDetailScreenLarge.scss" as *;
|
|
9
|
+
@forward "../variables/spacingDetailList.scss";
|
|
10
10
|
|
|
11
|
-
@
|
|
12
|
-
|
|
13
|
-
$sizeUnit: "px",
|
|
14
|
-
$negative: false
|
|
15
|
-
) {
|
|
16
|
-
@if $units {
|
|
17
|
-
@return _ds-get-spacings($spacingComponent, $units, $sizeUnit, $negative);
|
|
18
|
-
}
|
|
11
|
+
// @todo remove when possible
|
|
12
|
+
@forward "spacing-deprecated.scss";
|
|
19
13
|
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@mixin ds-spacing-layout(
|
|
14
|
+
@function ds-spacing(
|
|
24
15
|
$units: null,
|
|
25
|
-
$property: padding,
|
|
26
16
|
$sizeUnit: "px",
|
|
27
17
|
$negative: false
|
|
28
18
|
) {
|
|
29
19
|
@if $units {
|
|
30
|
-
$values:
|
|
31
|
-
@include ds-mq-largest-breakpoint(mobile) {
|
|
32
|
-
#{$property}: $values;
|
|
33
|
-
}
|
|
34
|
-
$valuesLargeScreen: _ds-get-spacings(
|
|
35
|
-
$spacingLayoutLargeScreen,
|
|
36
|
-
$units,
|
|
37
|
-
$sizeUnit,
|
|
38
|
-
$negative
|
|
39
|
-
);
|
|
40
|
-
@include ds-mq-smallest-breakpoint(tablet) {
|
|
41
|
-
#{$property}: $valuesLargeScreen;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
20
|
+
$values: ();
|
|
45
21
|
|
|
46
|
-
@
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
} @else if ($unit == 0) {
|
|
54
|
-
$value: 0 * 1;
|
|
55
|
-
} @else if ($value and type-of($value) == "number") {
|
|
56
|
-
@if ($sizeUnit == "rem") {
|
|
57
|
-
$value: (math.div($value, 16)) * 1rem;
|
|
58
|
-
} @else if ($sizeUnit == "em") {
|
|
59
|
-
$value: (math.div($value, 16)) * 1em;
|
|
22
|
+
@each $unit in $units {
|
|
23
|
+
@if map.has-key($spacingDetail, $unit) {
|
|
24
|
+
$value: var(--ds-spacing-#{$sizeUnit}-#{$unit});
|
|
25
|
+
@if ($negative) {
|
|
26
|
+
$value: calc(var(--ds-spacing-#{$sizeUnit}-#{$unit}) * -1);
|
|
27
|
+
}
|
|
28
|
+
$values: list.append($values, $value);
|
|
60
29
|
} @else {
|
|
61
|
-
$value: $
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
30
|
+
$value: $unit;
|
|
31
|
+
@if map.has-key($spacingBase, $unit) {
|
|
32
|
+
$value: map.get($spacingBase, $unit);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@if ($value == 0) {
|
|
36
|
+
$value: 0 * 1;
|
|
37
|
+
} @else if ($value and type-of($value) == "number") {
|
|
38
|
+
@if ($sizeUnit == "rem") {
|
|
39
|
+
$value: (math.div($value, 16)) * 1rem;
|
|
40
|
+
} @else {
|
|
41
|
+
$value: $value * 1px;
|
|
42
|
+
}
|
|
43
|
+
@if $negative {
|
|
44
|
+
$value: $value * -1;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
@if (type-of($value) == "number" or $value == "auto") {
|
|
48
|
+
$values: list.append($values, $value);
|
|
49
|
+
}
|
|
65
50
|
}
|
|
66
51
|
}
|
|
67
|
-
|
|
68
|
-
|
|
52
|
+
|
|
53
|
+
@if length($values) == 1 {
|
|
54
|
+
@return list.nth($values, 1);
|
|
69
55
|
}
|
|
70
|
-
}
|
|
71
56
|
|
|
72
|
-
|
|
73
|
-
@return list.nth($values, 1);
|
|
57
|
+
@return $values;
|
|
74
58
|
}
|
|
75
59
|
|
|
76
|
-
@return
|
|
60
|
+
@return null;
|
|
77
61
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "sass:meta";
|
|
3
|
+
@use "./variables/spacingDetail";
|
|
4
|
+
@use "./variables/spacingDetailScreenLarge";
|
|
5
|
+
@use "./helpers/mediaQueries.scss" as *;
|
|
6
|
+
@use "./helpers/utilities.scss" as *;
|
|
7
|
+
|
|
8
|
+
:root {
|
|
9
|
+
@each $name, $map in meta.module-variables("spacingDetail") {
|
|
10
|
+
@each $key in map-keys($map) {
|
|
11
|
+
--ds-spacing-px-#{$key}: #{map.get($map, $key) * 1px};
|
|
12
|
+
--ds-spacing-rem-#{$key}: #{ds-px-to-rem(map.get($map, $key))};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@include ds-mq-smallest-breakpoint(tablet) {
|
|
17
|
+
@each $name, $map in meta.module-variables("spacingDetailScreenLarge") {
|
|
18
|
+
@each $key in map-keys($map) {
|
|
19
|
+
--ds-spacing-px-#{$key}: #{map.get($map, $key) * 1px};
|
|
20
|
+
--ds-spacing-rem-#{$key}: #{ds-px-to-rem(map.get($map, $key))};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
$spacingDetail: (
|
|
2
|
+
outer: 16,
|
|
3
|
+
outer-negative: -16,
|
|
4
|
+
page-horizontal: 16,
|
|
5
|
+
page-top-small: 16,
|
|
6
|
+
gap-vertical-static-medium: 16,
|
|
7
|
+
gap-vertical-medium: 16,
|
|
8
|
+
gap-vertical-static-large: 32,
|
|
9
|
+
gap-vertical-static-small: 8,
|
|
10
|
+
page-top-xsmall: 4,
|
|
11
|
+
teaser-vertical-small: 8,
|
|
12
|
+
teaser-horizontal: 16,
|
|
13
|
+
teaser-vertical-medium: 12,
|
|
14
|
+
direkt-header-bottom: 48
|
|
15
|
+
);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
$ds-s-outer: outer;
|
|
2
|
+
$ds-s-outer-negative: outer-negative;
|
|
3
|
+
$ds-s-page-horizontal: page-horizontal;
|
|
4
|
+
$ds-s-page-top-small: page-top-small;
|
|
5
|
+
$ds-s-gap-vertical-static-medium: gap-vertical-static-medium;
|
|
6
|
+
$ds-s-gap-vertical-medium: gap-vertical-medium;
|
|
7
|
+
$ds-s-gap-vertical-static-large: gap-vertical-static-large;
|
|
8
|
+
$ds-s-gap-vertical-static-small: gap-vertical-static-small;
|
|
9
|
+
$ds-s-page-top-xsmall: page-top-xsmall;
|
|
10
|
+
$ds-s-teaser-vertical-small: teaser-vertical-small;
|
|
11
|
+
$ds-s-teaser-horizontal: teaser-horizontal;
|
|
12
|
+
$ds-s-teaser-vertical-medium: teaser-vertical-medium;
|
|
13
|
+
$ds-s-direkt-header-bottom: direkt-header-bottom;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
$spacingDetailScreenLarge: (
|
|
2
|
+
page-top-small: 32,
|
|
3
|
+
page-horizontal: 32,
|
|
4
|
+
gap-vertical-medium: 32,
|
|
5
|
+
teaser-vertical-small: 12,
|
|
6
|
+
teaser-horizontal: 16,
|
|
7
|
+
teaser-vertical-medium: 16,
|
|
8
|
+
direkt-header-bottom: 64,
|
|
9
|
+
outer: 16,
|
|
10
|
+
outer-negative: -16,
|
|
11
|
+
gap-vertical-static-medium: 16,
|
|
12
|
+
gap-vertical-static-large: 32,
|
|
13
|
+
gap-vertical-static-small: 8,
|
|
14
|
+
page-top-xsmall: 4
|
|
15
|
+
);
|
package/package.json
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"outer": "outer",
|
|
3
|
+
"outer-negative": "outer-negative",
|
|
4
|
+
"page-horizontal": "page-horizontal",
|
|
5
|
+
"page-top-small": "page-top-small",
|
|
6
|
+
"gap-vertical-static-medium": "gap-vertical-static-medium",
|
|
7
|
+
"gap-vertical-medium": "gap-vertical-medium",
|
|
8
|
+
"gap-vertical-static-large": "gap-vertical-static-large",
|
|
9
|
+
"gap-vertical-static-small": "gap-vertical-static-small",
|
|
10
|
+
"page-top-xsmall": "page-top-xsmall",
|
|
11
|
+
"teaser-vertical-small": "teaser-vertical-small",
|
|
12
|
+
"teaser-horizontal": "teaser-horizontal",
|
|
13
|
+
"teaser-vertical-medium": "teaser-vertical-medium",
|
|
14
|
+
"direkt-header-bottom": "direkt-header-bottom"
|
|
15
|
+
}
|
|
File without changes
|
/package/foundations/variables/{spacingComponentList.scss → deprecated/spacingComponentList.scss}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|