@bonniernews/dn-design-system-web 27.0.0 → 27.0.1
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
CHANGED
|
@@ -4,6 +4,13 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
## [27.0.1](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@27.0.0...@bonniernews/dn-design-system-web@27.0.1) (2025-02-10)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **web:** support color scheme ([#1600](https://github.com/BonnierNews/dn-design-system/issues/1600)) ([bd35beb](https://github.com/BonnierNews/dn-design-system/commit/bd35beb28a02bbbb486869301808deb6cf800084))
|
|
13
|
+
|
|
7
14
|
## [27.0.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@26.0.2...@bonniernews/dn-design-system-web@27.0.0) (2025-02-09)
|
|
8
15
|
|
|
9
16
|
|
package/foundations/colors.scss
CHANGED
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
@use "sass:meta";
|
|
3
1
|
@use "./helpers/gradients.scss" as *;
|
|
4
|
-
@use "./variables/gradientsDnLight";
|
|
5
|
-
@use "./variables/gradientsDnDark";
|
|
6
2
|
|
|
7
3
|
html,
|
|
8
4
|
.ds-light {
|
|
9
|
-
@
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
@include get-gradient-scheme();
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// enable listening to OS dark mode by setting class support-color-scheme on html-tag
|
|
9
|
+
html.support-color-scheme:not(.ds-light) {
|
|
10
|
+
@media (prefers-color-scheme: dark) {
|
|
11
|
+
@include get-gradient-scheme(dark);
|
|
13
12
|
}
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
// for manually switching on dark mode
|
|
17
|
-
// dnDark should only be used in storybook otherwise use ds-dark
|
|
18
|
-
.dnDark,
|
|
19
16
|
.ds-dark {
|
|
20
|
-
@
|
|
21
|
-
@each $key in map.keys($value) {
|
|
22
|
-
@include ds-gradient($key, dark);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
17
|
+
@include get-gradient-scheme(dark);
|
|
25
18
|
}
|
|
@@ -31,3 +31,9 @@
|
|
|
31
31
|
@function _get-stop($map, $key, $index) {
|
|
32
32
|
@return map.get(list.nth(map.get($map, "stops"), $index), $key);
|
|
33
33
|
}
|
|
34
|
+
|
|
35
|
+
@mixin get-gradient-scheme($type: light) {
|
|
36
|
+
@each $key in map.keys($gradientsDnLight) {
|
|
37
|
+
@include ds-gradient($key, $type);
|
|
38
|
+
}
|
|
39
|
+
}
|
package/foundations/shadows.scss
CHANGED
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
@use "sass:meta";
|
|
3
1
|
@use "./helpers/shadows.scss" as *;
|
|
4
|
-
@use "./variables/shadowsDnLight";
|
|
5
|
-
@use "./variables/shadowsDnDark";
|
|
6
2
|
|
|
7
3
|
html,
|
|
8
4
|
.ds-light {
|
|
9
|
-
@
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
@include get-shadow-scheme();
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// enable listening to OS dark mode by setting class support-color-scheme on html-tag
|
|
9
|
+
html.support-color-scheme:not(.ds-light) {
|
|
10
|
+
@media (prefers-color-scheme: dark) {
|
|
11
|
+
@include get-shadow-scheme(dark);
|
|
13
12
|
}
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
// for manually switching on dark mode
|
|
17
|
-
// dnDark should only be used in storybook otherwise use ds-dark
|
|
18
|
-
.dnDark,
|
|
19
16
|
.ds-dark {
|
|
20
|
-
@
|
|
21
|
-
@each $key in map.keys($value) {
|
|
22
|
-
@include ds-shadow($key, dark);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
17
|
+
@include get-shadow-scheme(dark);
|
|
25
18
|
}
|
package/package.json
CHANGED