@internetstiftelsen/styleguide 4.1.13 → 5.0.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.
Files changed (145) hide show
  1. package/package.json +18 -18
  2. package/src/app.scss +85 -88
  3. package/src/atoms/archive-link/archive-link.scss +24 -17
  4. package/src/atoms/button/_button.scss +209 -203
  5. package/src/atoms/checkbox/_checkbox.scss +33 -26
  6. package/src/atoms/file/_file.scss +23 -13
  7. package/src/atoms/grid-toggle/_grid-toggle.scss +11 -6
  8. package/src/atoms/height-limiter/_height-limiter.scss +21 -14
  9. package/src/atoms/input/_input.scss +23 -16
  10. package/src/atoms/label/label.scss +11 -5
  11. package/src/atoms/logotype/_logotype.scss +3 -2
  12. package/src/atoms/main-menu/_main-menu.scss +67 -60
  13. package/src/atoms/meta/_meta.scss +44 -33
  14. package/src/atoms/meta/meta.config.js +1 -1
  15. package/src/atoms/paging/_paging.scss +27 -21
  16. package/src/atoms/password-toggle/_password-toggle.scss +9 -6
  17. package/src/atoms/progress/_progress.scss +19 -11
  18. package/src/atoms/quote/_quote.scss +17 -10
  19. package/src/atoms/radiobutton/_radiobutton.scss +33 -26
  20. package/src/atoms/range/_range.scss +46 -39
  21. package/src/atoms/rating/_rating.scss +11 -4
  22. package/src/atoms/ribbon/_ribbon.scss +16 -9
  23. package/src/atoms/select/_select.scss +18 -10
  24. package/src/atoms/skip/_skip.scss +9 -6
  25. package/src/atoms/spinner/_spinner.scss +4 -3
  26. package/src/atoms/tag/_tag.scss +26 -19
  27. package/src/atoms/textarea/_textarea.scss +22 -13
  28. package/src/atoms/tooltip/_tooltip.scss +28 -21
  29. package/src/base/_grid.scss +4 -4
  30. package/src/base/_normalize.scss +29 -27
  31. package/src/base/fonts/_fonts.scss +1 -1
  32. package/src/components.js +0 -2
  33. package/src/configurations/_bem.scss +10 -7
  34. package/src/configurations/_config.scss +11 -10
  35. package/src/configurations/_extends.scss +38 -34
  36. package/src/configurations/_functions.scss +23 -7
  37. package/src/configurations/_mixins.scss +23 -19
  38. package/src/configurations/_recaptcha.scss +2 -2
  39. package/src/configurations/_variables.scss +19 -25
  40. package/src/configurations/_wordpress.scss +64 -57
  41. package/src/configurations/colors/_background-colors.scss +3 -2
  42. package/src/configurations/colors/_colors-functions.scss +41 -39
  43. package/src/configurations/colors/_colors.scss +1 -1
  44. package/src/configurations/colors/_text-colors.scss +3 -2
  45. package/src/configurations/colors/_wordpress-colors.scss +3 -2
  46. package/src/configurations/forms/_fields.scss +28 -23
  47. package/src/configurations/grid/_grid.scss +33 -28
  48. package/src/configurations/typography/_typography.scss +113 -105
  49. package/src/configurations/typography/readme.md +1 -1
  50. package/src/globals.scss +16 -18
  51. package/src/isolated-footer.scss +25 -25
  52. package/src/molecules/alert/_alert.scss +44 -35
  53. package/src/molecules/breadcrumb/_breadcrumb.scss +43 -35
  54. package/src/molecules/byline/_byline.scss +30 -21
  55. package/src/molecules/card/_card.scss +87 -77
  56. package/src/molecules/context-menu/_context-menu.scss +32 -15
  57. package/src/molecules/continue-video-guide/continue-video-guide.scss +37 -28
  58. package/src/molecules/cookie-disclaimer/cookie-disclaimer.scss +32 -23
  59. package/src/molecules/download/_download.scss +38 -30
  60. package/src/molecules/form-control/_form-control.scss +66 -58
  61. package/src/molecules/glider/_glider-course.scss +29 -23
  62. package/src/molecules/glider/_glider-hero.scss +112 -104
  63. package/src/molecules/glider/_glider.scss +36 -30
  64. package/src/molecules/icon-overlay/_icon-overlay.scss +29 -20
  65. package/src/molecules/info-box/_info-box.scss +31 -22
  66. package/src/molecules/input-group/_input-group.scss +23 -13
  67. package/src/molecules/modal/_modal.scss +77 -65
  68. package/src/molecules/multi-select/_multi-select.scss +44 -33
  69. package/src/molecules/natural-language-form/_natural-language-form.scss +33 -23
  70. package/src/molecules/overview-navigation/_overview-navigation.scss +54 -45
  71. package/src/molecules/readspeaker/_readspeaker.scss +1 -1
  72. package/src/molecules/share/_share.scss +23 -15
  73. package/src/molecules/submenu/_submenu.scss +77 -69
  74. package/src/molecules/system-error/_system-error.scss +26 -17
  75. package/src/molecules/table/_table.scss +50 -42
  76. package/src/molecules/teaser-news-list/_teaser-news-list.scss +21 -12
  77. package/src/organisms/accordion/_accordion.scss +59 -49
  78. package/src/organisms/domain-search/_domain-search.scss +54 -45
  79. package/src/organisms/event-listing-item/_event-listing-item.scss +36 -26
  80. package/src/organisms/features-box/_features-box.scss +30 -19
  81. package/src/organisms/filter/_filter.scss +15 -10
  82. package/src/organisms/footer/_footer.scss +119 -109
  83. package/src/organisms/header/_header.scss +24 -14
  84. package/src/organisms/hero/_hero--bbk.scss +50 -38
  85. package/src/organisms/hero/_hero--dynamic-headline.scss +49 -39
  86. package/src/organisms/hero/_hero.scss +222 -207
  87. package/src/organisms/hero/hero.config.js +2 -2
  88. package/src/organisms/mailchimp/_mailchimp.scss +52 -42
  89. package/src/organisms/mega-menu/_mega-menu.scss +55 -45
  90. package/src/organisms/members-service-product/_members-service-product.scss +29 -18
  91. package/src/organisms/members-service-product/members-service-product.config.js +5 -5
  92. package/src/organisms/podcast/_podcast-episodes.scss +85 -75
  93. package/src/organisms/podcast/_podcast-player.scss +73 -64
  94. package/src/organisms/schedule/_schedule.scss +92 -82
  95. package/src/organisms/search/_search.scss +68 -58
  96. package/src/organisms/search-result/_search-result.scss +50 -40
  97. package/src/organisms/sections/_sections.scss +41 -31
  98. package/src/organisms/tabs/_tabs.scss +58 -46
  99. package/src/organisms/timeline/_timeline.scss +92 -81
  100. package/src/organisms/video-guide/_video-guide.scss +148 -138
  101. package/src/pages/animate-footer/animate-footer.config.js +180 -1
  102. package/src/print.scss +1 -1
  103. package/src/structures/_article.scss +39 -28
  104. package/src/structures/_core-values.scss +14 -2
  105. package/src/structures/_manifest.scss +4 -4
  106. package/src/structures/_section.scss +32 -20
  107. package/src/structures/_site.scss +19 -7
  108. package/src/theme/_dark-mode.scss +14 -13
  109. package/src/theme/_theme.scss +28 -25
  110. package/src/utilities/_align.scss +1 -1
  111. package/src/utilities/_border.scss +5 -3
  112. package/src/utilities/_box-shadow.scss +5 -2
  113. package/src/utilities/_display.scss +1 -1
  114. package/src/utilities/_fill.scss +5 -4
  115. package/src/utilities/_flex.scss +1 -1
  116. package/src/utilities/_font-size.scss +6 -5
  117. package/src/utilities/_fonts.scss +6 -5
  118. package/src/utilities/_gutter.scss +3 -2
  119. package/src/utilities/_hide.scss +17 -15
  120. package/src/utilities/_icons.scss +37 -33
  121. package/src/utilities/_indent.scss +8 -6
  122. package/src/utilities/_links.scss +22 -18
  123. package/src/utilities/_lists.scss +19 -14
  124. package/src/utilities/_manifest.scss +27 -27
  125. package/src/utilities/_margin.scss +20 -17
  126. package/src/utilities/_misc.scss +3 -2
  127. package/src/utilities/_padding.scss +18 -15
  128. package/src/utilities/_position.scss +3 -2
  129. package/src/utilities/_show.scss +7 -6
  130. package/src/utilities/_text.scss +1 -1
  131. package/src/utilities/_vertical-align.scss +1 -1
  132. package/src/utilities/_wrap.scss +1 -1
  133. package/src/utilities/_z-index.scss +7 -6
  134. package/src/utilities/tab-highlighting/_tab-highlighting.scss +6 -5
  135. package/src/vendor/baseline/_plumber.scss +14 -13
  136. package/src/vendor/grid/_breakpoints.scss +17 -13
  137. package/src/vendor/grid/_flex.scss +8 -4
  138. package/src/vendor/grid/_functions.scss +9 -6
  139. package/src/vendor/grid/_grid-framework.scss +14 -9
  140. package/src/vendor/grid/_grid.scss +19 -16
  141. package/src/vendor/grid/_spacing.scss +8 -3
  142. package/src/atoms/toggle-high-contrast/readme.md +0 -6
  143. package/src/atoms/toggle-high-contrast/toggle-high-contrast.config.js +0 -8
  144. package/src/atoms/toggle-high-contrast/toggle-high-contrast.js +0 -10
  145. package/src/molecules/modal/modal-graph.js +0 -40
@@ -1,4 +1,7 @@
1
- @charset 'UTF-8';
1
+ @charset "UTF-8";
2
+ @use '../configurations/config' as config;
3
+ @use '../configurations/variables' as var;
4
+ @use '../configurations/functions' as func;
2
5
 
3
6
  /// @group Utilities
4
7
  $class-p: u-p !default;
@@ -13,58 +16,58 @@ $class-p-y: u-p-y !default;
13
16
  @for $i from 0 through 8 {
14
17
  // Padding all
15
18
  .#{$class-p}-#{$i} {
16
- padding: rhythm($i) !important;
19
+ padding: func.rhythm($i) !important;
17
20
  }
18
21
 
19
22
  // Padding top
20
23
  .#{$class-p-t}-#{$i} {
21
- padding-top: rhythm($i) !important;
24
+ padding-top: func.rhythm($i) !important;
22
25
  }
23
26
 
24
27
  // Padding right
25
28
  .#{$class-p-r}-#{$i} {
26
- padding-right: rhythm($i) !important;
29
+ padding-right: func.rhythm($i) !important;
27
30
  }
28
31
 
29
32
  // Padding bottom
30
33
  .#{$class-p-b}-#{$i} {
31
- padding-bottom: rhythm($i) !important;
34
+ padding-bottom: func.rhythm($i) !important;
32
35
  }
33
36
 
34
37
  // Padding left
35
38
  .#{$class-p-l}-#{$i} {
36
- padding-left: rhythm($i) !important;
39
+ padding-left: func.rhythm($i) !important;
37
40
  }
38
41
 
39
42
  // Padding x (left and right)
40
43
  .#{$class-p-x}-#{$i} {
41
- padding-right: rhythm($i) !important;
42
- padding-left: rhythm($i) !important;
44
+ padding-right: func.rhythm($i) !important;
45
+ padding-left: func.rhythm($i) !important;
43
46
  }
44
47
 
45
48
  // Padding x (left and right)
46
49
  .#{$class-p-y}-#{$i} {
47
- padding-top: rhythm($i) !important;
48
- padding-bottom: rhythm($i) !important;
50
+ padding-top: func.rhythm($i) !important;
51
+ padding-bottom: func.rhythm($i) !important;
49
52
  }
50
53
  }
51
54
 
52
55
  .u-p-default {
53
- padding: $default-padding !important;
56
+ padding: config.$default-padding !important;
54
57
  }
55
58
 
56
59
  .u-p-t-default {
57
- padding-top: $default-padding !important;
60
+ padding-top: config.$default-padding !important;
58
61
  }
59
62
 
60
63
  .u-p-b-default {
61
- padding-bottom: $default-padding !important;
64
+ padding-bottom: config.$default-padding !important;
62
65
  }
63
66
 
64
67
  .u-p-l-default {
65
- padding-left: $default-padding !important;
68
+ padding-left: config.$default-padding !important;
66
69
  }
67
70
 
68
71
  .u-p-r-default {
69
- padding-right: $default-padding !important;
72
+ padding-right: config.$default-padding !important;
70
73
  }
@@ -1,4 +1,5 @@
1
- @charset 'UTF-8';
1
+ @charset "UTF-8";
2
+ @use '../configurations/functions' as func;
2
3
 
3
4
  .u-position-absolute {
4
5
  position: absolute !important;
@@ -23,5 +24,5 @@
23
24
 
24
25
  .u-position-sticky-top-4 {
25
26
  position: sticky !important;
26
- top: rhythm(4) !important;
27
+ top: func.rhythm(4) !important;
27
28
  }
@@ -1,31 +1,32 @@
1
- @charset 'UTF-8';
1
+ @charset "UTF-8";
2
+ @use '../vendor/grid/breakpoints' as breakpoint;
2
3
 
3
4
  .u-show-xs {
4
- @include bp-down(xs) {
5
+ @include breakpoint.bp-down(xs) {
5
6
  display: initial !important;
6
7
  }
7
8
  }
8
9
 
9
10
  .u-show-sm-xs {
10
- @include bp-down(sm-xs) {
11
+ @include breakpoint.bp-down(sm-xs) {
11
12
  display: initial !important;
12
13
  }
13
14
  }
14
15
 
15
16
  .u-show-sm {
16
- @include bp-down(sm) {
17
+ @include breakpoint.bp-down(sm) {
17
18
  display: initial !important;
18
19
  }
19
20
  }
20
21
 
21
22
  .u-show-md {
22
- @include bp-down(md) {
23
+ @include breakpoint.bp-down(md) {
23
24
  display: initial !important;
24
25
  }
25
26
  }
26
27
 
27
28
  .u-show-lg {
28
- @include bp-down(lg) {
29
+ @include breakpoint.bp-down(lg) {
29
30
  display: initial !important;
30
31
  }
31
32
  }
@@ -1,4 +1,4 @@
1
- @charset 'UTF-8';
1
+ @charset "UTF-8";
2
2
 
3
3
  .u-decoration-underline {
4
4
  text-decoration: underline !important;
@@ -1,4 +1,4 @@
1
- @charset 'UTF-8';
1
+ @charset "UTF-8";
2
2
 
3
3
  .u-valign-baseline {
4
4
  vertical-align: baseline !important;
@@ -1,4 +1,4 @@
1
- @charset 'UTF-8';
1
+ @charset "UTF-8";
2
2
 
3
3
  .u-nowrap {
4
4
  white-space: nowrap !important;
@@ -1,21 +1,22 @@
1
- @charset 'UTF-8';
1
+ @charset "UTF-8";
2
+ @use '../configurations/functions' as func;
2
3
 
3
4
  .u-z-index-background {
4
- z-index: z_index(background) !important;
5
+ z-index: func.z_index(background) !important;
5
6
  }
6
7
 
7
8
  .u-z-index-foreground {
8
- z-index: z_index(foreground) !important;
9
+ z-index: func.z_index(foreground) !important;
9
10
  }
10
11
 
11
12
  .u-z-index-foreground-minus {
12
- z-index: z_index(foregroundMinus) !important;
13
+ z-index: func.z_index(foregroundMinus) !important;
13
14
  }
14
15
 
15
16
  .u-z-index-middleground {
16
- z-index: z_index(middleground) !important;
17
+ z-index: func.z_index(middleground) !important;
17
18
  }
18
19
 
19
20
  .u-z-index-middleground-important {
20
- z-index: z_index(middlegroundImportant) !important;
21
+ z-index: func.z_index(middlegroundImportant) !important;
21
22
  }
@@ -1,6 +1,7 @@
1
- @charset 'UTF-8';
1
+ @charset "UTF-8";
2
+ @use '../../configurations/colors/colors' as colors;
2
3
 
3
- $color-tab-highlight: $color-ruby !default;
4
+ $color-tab-highlight: colors.$color-ruby !default;
4
5
 
5
6
  // Remove focus styling only when JS is active
6
7
  .js {
@@ -24,11 +25,11 @@ $color-tab-highlight: $color-ruby !default;
24
25
  }
25
26
 
26
27
  &::-webkit-slider-thumb {
27
- box-shadow: 0 0 0 inset rgba($color-cyberspace, 0.2), 0 1px 2px rgba($color-cyberspace, 0.2), 0 0 0 3px inset $color-tab-highlight !important;
28
+ box-shadow: 0 0 0 inset rgba(colors.$color-cyberspace, 0.2), 0 1px 2px rgba(colors.$color-cyberspace, 0.2), 0 0 0 3px inset $color-tab-highlight !important;
28
29
  }
29
30
 
30
31
  &::-moz-range-thumb {
31
- box-shadow: 0 0 0 inset rgba($color-cyberspace, 0.2), 0 1px 2px rgba($color-cyberspace, 0.2), 0 0 0 3px inset $color-tab-highlight !important;
32
+ box-shadow: 0 0 0 inset rgba(colors.$color-cyberspace, 0.2), 0 1px 2px rgba(colors.$color-cyberspace, 0.2), 0 0 0 3px inset $color-tab-highlight !important;
32
33
  }
33
34
  }
34
35
 
@@ -38,6 +39,6 @@ $color-tab-highlight: $color-ruby !default;
38
39
  .tab-highlight .color-inverse .has-focus {
39
40
  &,
40
41
  + label {
41
- box-shadow: 0 0 0 2px inset $color-snow !important;
42
+ box-shadow: 0 0 0 2px inset colors.$color-snow !important;
42
43
  }
43
44
  }
@@ -1,12 +1,13 @@
1
1
  @charset "UTF-8";
2
+ @use "sass:math";
3
+ @use "sass:meta";
4
+ @use "sass:map";
2
5
 
3
6
  // PLUMBER - Easy baseline grids with SASS
4
7
  // https://jamonserrano.github.io/plumber-sass
5
8
  // Copyright 2016 Viktor Honti
6
9
  // MIT License
7
10
 
8
- @use "sass:math";
9
-
10
11
  @mixin plumber(
11
12
  $font-size: null,
12
13
  $line-height: null,
@@ -21,7 +22,7 @@
21
22
  @if not $font-size {
22
23
  $font-size: -plumber-get-default(font-size);
23
24
  }
24
- @if not unitless($font-size) or $font-size <= 0 {
25
+ @if not math.is-unitless($font-size) or $font-size <= 0 {
25
26
  @error '$font-size parameter must be a positive unitless number, got #{$font-size} instead';
26
27
  }
27
28
 
@@ -29,7 +30,7 @@
29
30
  @if not $line-height {
30
31
  $line-height: -plumber-get-default(line-height);
31
32
  }
32
- @if not unitless($line-height) or $line-height != round($line-height) or $line-height < 1 {
33
+ @if not math.is-unitless($line-height) or $line-height != math.round($line-height) or $line-height < 1 {
33
34
  @error '$line-height parameter must be a positive unitless integer, got #{$line-height} instead';
34
35
  }
35
36
 
@@ -53,7 +54,7 @@
53
54
  @if not $grid-height {
54
55
  $grid-height: -plumber-get-default(grid-height);
55
56
  }
56
- @if unitless($grid-height) or $grid-height < 0 {
57
+ @if math.is-unitless($grid-height) or $grid-height < 0 {
57
58
  @error '$grid-height parameter must be a positive unit, got #{$grid-height} instead';
58
59
  }
59
60
 
@@ -63,7 +64,7 @@
63
64
  }
64
65
  @if not $baseline {
65
66
  @error '$baseline must be passed as a parameter or defined in defaults';
66
- } @else if not (unitless($baseline) and $baseline >= 0 and $baseline < 1) {
67
+ } @else if not (math.is-unitless($baseline) and $baseline >= 0 and $baseline < 1) {
67
68
  @error '$baseline parameter must be a unitless fraction between 0 and 1, got #{$baseline} instead';
68
69
  }
69
70
 
@@ -71,7 +72,7 @@
71
72
  @if not $use-baseline-origin {
72
73
  $use-baseline-origin: -plumber-get-default(use-baseline-origin);
73
74
  }
74
- @if type-of($use-baseline-origin) != bool {
75
+ @if meta.type-of($use-baseline-origin) != bool {
75
76
  @error '$use-baseline-origin parameter must be Boolean, got #{$use-baseline-origin} instead';
76
77
  }
77
78
 
@@ -79,7 +80,7 @@
79
80
  // the distance of the original baseline from the bottom
80
81
  $baseline-from-bottom: math.div($line-height - $font-size, 2) + ($font-size * $baseline);
81
82
  // the corrected baseline will be on the nearest gridline
82
- $corrected-baseline: round($baseline-from-bottom);
83
+ $corrected-baseline: math.round($baseline-from-bottom);
83
84
  // the difference between the original and the corrected baseline
84
85
  $baseline-difference: $corrected-baseline - $baseline-from-bottom;
85
86
 
@@ -120,7 +121,7 @@
120
121
  }
121
122
 
122
123
  // round pixel values to decrease browser inconsistencies
123
- @if unit($grid-height) == 'px' {
124
+ @if math.unit($grid-height) == 'px' {
124
125
  $line-height: -plumber-round($line-height);
125
126
  $margin-top: -plumber-round($margin-top);
126
127
  $padding-top: -plumber-round($padding-top);
@@ -151,21 +152,21 @@ $-plumber-defaults: (
151
152
 
152
153
  // Merge provided settings into the defaults map
153
154
  @mixin plumber-set-defaults($defaults...) {
154
- $-plumber-defaults: map-merge($-plumber-defaults, keywords($defaults)) !global;
155
+ $-plumber-defaults: map.merge($-plumber-defaults, meta.keywords($defaults)) !global;
155
156
  }
156
157
 
157
158
  // Get a default value
158
159
  @function -plumber-get-default($key) {
159
- @return map-get($-plumber-defaults, $key);
160
+ @return map.get($-plumber-defaults, $key);
160
161
  }
161
162
 
162
163
  // Check if a value is a non-negative integer
163
164
  @function -plumber-is-integer($value) {
164
- @return (unitless($value) and $value == round($value));
165
+ @return (math.is-unitless($value) and $value == math.round($value));
165
166
  }
166
167
 
167
168
  // Round value to the nearest quarter pixel
168
169
  // This provides reasonable precision and prevents grid creep (by fractions adding up) in most browsers
169
170
  @function -plumber-round($value) {
170
- @return math.div(round($value * 4), 4);
171
+ @return math.div(math.round($value * 4), 4);
171
172
  }
@@ -1,4 +1,8 @@
1
- @charset 'UTF-8';
1
+ @charset "UTF-8";
2
+ @use "sass:list";
3
+ @use "sass:map";
4
+ @use '../../configurations/variables' as var;
5
+ @use '../../configurations/functions' as func;
2
6
 
3
7
  // Breakpoint viewport sizes and media queries.
4
8
  //
@@ -6,7 +10,7 @@
6
10
  //
7
11
  // (xs: 0, sm: 576px, md: 769px, lg: 992px, xl: 1200px, xxl: 1400)
8
12
  //
9
- // The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.
13
+ // The map defined in the `var.$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.
10
14
 
11
15
  // Name of the next breakpoint, or null for the last breakpoint.
12
16
  //
@@ -16,17 +20,17 @@
16
20
  // md
17
21
  // >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))
18
22
  // md
19
- @function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
20
- $n: index($breakpoint-names, $name);
21
- @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
23
+ @function breakpoint-next($name, $breakpoints: var.$grid-breakpoints, $breakpoint-names: map.keys($breakpoints)) {
24
+ $n: list.index($breakpoint-names, $name);
25
+ @return if($n < list.length($breakpoint-names), list.nth($breakpoint-names, $n + 1), null);
22
26
  }
23
27
 
24
28
  // Minimum breakpoint width. Null for the smallest (first) breakpoint.
25
29
  //
26
30
  // >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 769px, lg: 992px, xl: 1200px, xxl: 1400))
27
31
  // 576px
28
- @function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
29
- $min: map-get($breakpoints, $name);
32
+ @function breakpoint-min($name, $breakpoints: var.$grid-breakpoints) {
33
+ $min: map.get($breakpoints, $name);
30
34
  @return if($min != 0, $min, null);
31
35
  }
32
36
 
@@ -35,7 +39,7 @@
35
39
  //
36
40
  // >> breakpoint-max(sm, (xs: 0, sm: 576px, md: 769px, lg: 992px, xl: 1200px, xxl: 1400))
37
41
  // 767px
38
- @function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
42
+ @function breakpoint-max($name, $breakpoints: var.$grid-breakpoints) {
39
43
  $next: breakpoint-next($name, $breakpoints);
40
44
  @return if($next, breakpoint-min($next, $breakpoints) - 1px, null);
41
45
  }
@@ -47,13 +51,13 @@
47
51
  // "" (Returns a blank string)
48
52
  // >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 769px, lg: 992px, xl: 1200px, xxl: 1400))
49
53
  // "-sm"
50
- @function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {
54
+ @function breakpoint-infix($name, $breakpoints: var.$grid-breakpoints) {
51
55
  @return if(breakpoint-min($name, $breakpoints) == null, '', '-#{$name}');
52
56
  }
53
57
 
54
58
  // Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
55
59
  // Makes the @content apply to the given breakpoint and wider.
56
- @mixin bp-up($name, $breakpoints: $grid-breakpoints) {
60
+ @mixin bp-up($name, $breakpoints: var.$grid-breakpoints) {
57
61
  $min: breakpoint-min($name, $breakpoints);
58
62
  @if $min {
59
63
  @media (min-width: $min) {
@@ -66,7 +70,7 @@
66
70
 
67
71
  // Media of at most the maximum breakpoint width. No query for the largest breakpoint.
68
72
  // Makes the @content apply to the given breakpoint and narrower.
69
- @mixin bp-down($name, $breakpoints: $grid-breakpoints) {
73
+ @mixin bp-down($name, $breakpoints: var.$grid-breakpoints) {
70
74
  $max: breakpoint-max($name, $breakpoints);
71
75
  @if $max {
72
76
  @media (max-width: $max) {
@@ -79,7 +83,7 @@
79
83
 
80
84
  // Media that spans multiple breakpoint widths.
81
85
  // Makes the @content apply between the min and max breakpoints
82
- @mixin bp-between($lower, $upper, $breakpoints: $grid-breakpoints) {
86
+ @mixin bp-between($lower, $upper, $breakpoints: var.$grid-breakpoints) {
83
87
  $min: breakpoint-min($lower, $breakpoints);
84
88
  $max: breakpoint-max($upper, $breakpoints);
85
89
 
@@ -91,7 +95,7 @@
91
95
  // Media between the breakpoint's minimum and maximum widths.
92
96
  // No minimum for the smallest breakpoint, and no maximum for the largest one.
93
97
  // Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
94
- @mixin bp-only($name, $breakpoints: $grid-breakpoints) {
98
+ @mixin bp-only($name, $breakpoints: var.$grid-breakpoints) {
95
99
  $min: breakpoint-min($name, $breakpoints);
96
100
  $max: breakpoint-max($name, $breakpoints);
97
101
 
@@ -1,12 +1,16 @@
1
- @charset 'UTF-8';
1
+ @charset "UTF-8";
2
+ @use "sass:map";
3
+ @use '../../configurations/variables' as var;
4
+ @use '../../configurations/functions' as func;
5
+ @use 'breakpoints' as breakpoint;
2
6
 
3
7
  // Flex variation
4
8
  //
5
9
  // Custom styles for additional flex alignment options.
6
10
 
7
- @each $breakpoint in map-keys($grid-breakpoints) {
8
- @include bp-up($breakpoint) {
9
- $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
11
+ @each $breakpoint in map.keys(var.$grid-breakpoints) {
12
+ @include breakpoint.bp-up($breakpoint) {
13
+ $infix: breakpoint.breakpoint-infix($breakpoint, var.$grid-breakpoints);
10
14
 
11
15
  .display-flex { display: flex !important; }
12
16
 
@@ -1,14 +1,17 @@
1
- @charset 'UTF-8';
1
+ @use "sass:list";
2
+ @use "sass:map";
3
+ @use "sass:math";
4
+ @charset "UTF-8";
2
5
 
3
6
  // Ascending
4
7
  // Used to evaluate Sass maps like our grid breakpoints.
5
- @mixin _assert-ascending($map, $map-name) {
8
+ @mixin assert-ascending($map, $map-name) {
6
9
  $prev-key: null;
7
10
  $prev-num: null;
8
11
  @each $key, $num in $map {
9
12
  @if $prev-num == null {
10
13
  // Do nothing
11
- } @else if not comparable($prev-num, $num) {
14
+ } @else if not math.compatible($prev-num, $num) {
12
15
  @warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !";
13
16
  } @else if $prev-num >= $num {
14
17
  @warn "Invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} which isn't greater than #{$prev-num}, the value of the previous key '#{$prev-key}' !";
@@ -20,9 +23,9 @@
20
23
 
21
24
  // Starts at zero
22
25
  // Another grid mixin that ensures the min-width of the lowest breakpoint starts at 0.
23
- @mixin _assert-starts-at-zero($map) {
24
- $values: map-values($map);
25
- $first-value: nth($values, 1);
26
+ @mixin assert-starts-at-zero($map) {
27
+ $values: map.values($map);
28
+ $first-value: list.nth($values, 1);
26
29
  @if $first-value != 0 {
27
30
  @warn 'First breakpoint in `$grid-breakpoints` must start at 0, but starts at #{$first-value}.';
28
31
  }
@@ -1,13 +1,18 @@
1
- @charset 'UTF-8';
1
+ @charset "UTF-8";
2
+ @use "sass:map";
3
+ @use "sass:math";
4
+ @use "sass:list";
5
+ @use '../../configurations/variables' as var;
6
+ @use '../../configurations/functions' as func;
7
+ @use 'breakpoints' as breakpoint;
8
+ @use 'grid' as m5;
2
9
 
3
10
  // Framework grid generation
4
11
  //
5
12
  // Used to generate the correct number of grid classes given
6
13
  // any value of `$grid-columns`.
7
14
 
8
- @use "sass:math";
9
-
10
- @mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {
15
+ @mixin make-grid-columns($columns: var.$grid-columns, $gutter: var.$grid-gutter-width, $breakpoints: var.$grid-breakpoints) {
11
16
  // Common properties for all breakpoints
12
17
  %grid-column {
13
18
  position: relative;
@@ -17,8 +22,8 @@
17
22
  padding-left: math.div($gutter, 2);
18
23
  }
19
24
 
20
- @each $breakpoint in map-keys($breakpoints) {
21
- $infix: breakpoint-infix($breakpoint, $breakpoints);
25
+ @each $breakpoint in map.keys($breakpoints) {
26
+ $infix: breakpoint.breakpoint-infix($breakpoint, $breakpoints);
22
27
 
23
28
  // Allow columns to stretch full width below their breakpoints
24
29
  @for $i from 1 through $columns {
@@ -32,7 +37,7 @@
32
37
  @extend %grid-column;
33
38
  }
34
39
 
35
- @include bp-up($breakpoint, $breakpoints) {
40
+ @include breakpoint.bp-up($breakpoint, $breakpoints) {
36
41
  // Provide basic `.grid-{bp}` classes for equal-width flexbox columns
37
42
  .grid#{$infix} {
38
43
  flex-basis: 0;
@@ -48,7 +53,7 @@
48
53
 
49
54
  @for $i from 1 through $columns {
50
55
  .grid#{$infix}-#{$i} {
51
- @include make-col($i, $columns);
56
+ @include m5.make-col($i, $columns);
52
57
  }
53
58
  }
54
59
 
@@ -62,7 +67,7 @@
62
67
  @for $i from 0 through ($columns - 1) {
63
68
  @if not ($infix == '' and $i == 0) { // Avoid emitting useless .offset-0
64
69
  .offset#{$infix}-#{$i} {
65
- @include make-col-offset($i, $columns); }
70
+ @include m5.make-col-offset($i, $columns); }
66
71
  }
67
72
  }
68
73
  }
@@ -1,23 +1,26 @@
1
- @charset 'UTF-8';
1
+ @charset "UTF-8";
2
+ @use "sass:math";
3
+ @use "sass:list";
4
+ @use '../../configurations/variables' as var;
5
+ @use '../../configurations/functions' as func;
6
+ @use 'breakpoints' as breakpoint;
2
7
 
3
8
  /// Grid system
4
9
  //
5
10
  // Generate semantic grid columns with these mixins.
6
11
 
7
- @use "sass:math";
8
-
9
12
  @mixin make-container() {
10
13
  width: 100%;
11
14
  margin-right: auto;
12
15
  margin-left: auto;
13
- padding-right: math.div($grid-gutter-width, 2);
14
- padding-left: math.div($grid-gutter-width, 2);
16
+ padding-right: math.div(var.$grid-gutter-width, 2);
17
+ padding-left: math.div(var.$grid-gutter-width, 2);
15
18
  }
16
19
 
17
20
  // For each breakpoint, define the maximum width of the container in a media query
18
- @mixin make-container-max-widths($max-widths: $container-max-widths, $breakpoints: $grid-breakpoints) {
21
+ @mixin make-container-max-widths($max-widths: var.$container-max-widths, $breakpoints: var.$grid-breakpoints) {
19
22
  @each $breakpoint, $container-max-width in $max-widths {
20
- @include bp-up($breakpoint, $breakpoints) {
23
+ @include breakpoint.bp-up($breakpoint, $breakpoints) {
21
24
  max-width: $container-max-width;
22
25
  }
23
26
  }
@@ -26,8 +29,8 @@
26
29
  @mixin make-row() {
27
30
  display: flex;
28
31
  flex-wrap: wrap;
29
- margin-right: math.div($grid-gutter-width, -2);
30
- margin-left: math.div($grid-gutter-width, -2);
32
+ margin-right: math.div(var.$grid-gutter-width, -2);
33
+ margin-left: math.div(var.$grid-gutter-width, -2);
31
34
  }
32
35
 
33
36
  @mixin make-col-ready() {
@@ -37,18 +40,18 @@
37
40
  // later on to override this initial width.
38
41
  width: 100%;
39
42
  min-height: 1px; // Prevent collapsing
40
- padding-right: math.div($grid-gutter-width, 2);
41
- padding-left: math.div($grid-gutter-width, 2);
43
+ padding-right: math.div(var.$grid-gutter-width, 2);
44
+ padding-left: math.div(var.$grid-gutter-width, 2);
42
45
  }
43
46
 
44
- @mixin make-col($size, $columns: $grid-columns) {
45
- flex: 0 0 percentage(math.div($size, $columns));
47
+ @mixin make-col($size, $columns: var.$grid-columns) {
48
+ flex: 0 0 math.percentage(math.div($size, $columns));
46
49
  // Add a `max-width` to ensure content within each column does not blow out
47
50
  // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
48
51
  // do not appear to require this.
49
- max-width: percentage(math.div($size, $columns));
52
+ max-width: math.percentage(math.div($size, $columns));
50
53
  }
51
54
 
52
- @mixin make-col-offset($size, $columns: $grid-columns) {
53
- margin-left: percentage(math.div($size, $columns));
55
+ @mixin make-col-offset($size, $columns: var.$grid-columns) {
56
+ margin-left: math.percentage(math.div($size, $columns));
54
57
  }
@@ -1,6 +1,11 @@
1
- @each $breakpoint in map-keys($grid-breakpoints) {
2
- @include bp-up($breakpoint) {
3
- $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
1
+ @use "sass:map";
2
+ @use '../../configurations/variables' as var;
3
+ @use '../../configurations/functions' as func;
4
+ @use 'breakpoints' as breakpoint;
5
+
6
+ @each $breakpoint in map.keys(var.$grid-breakpoints) {
7
+ @include breakpoint.bp-up($breakpoint) {
8
+ $infix: breakpoint.breakpoint-infix($breakpoint, var.$grid-breakpoints);
4
9
 
5
10
  // Some special margin utils
6
11
  .m#{$infix}-auto { margin: auto !important; }
@@ -1,6 +0,0 @@
1
- # Toggle High Contrast
2
- When clicked, this component triggers the class ```high-contrast``` on the body-element which activated high contrast styles based on that class. The background is made dark and the text is made white.
3
-
4
- When activated, the site is not supposed to "look good". It's suppose to make text easier to read.
5
-
6
- The javascript is activated by this class: ```js-toggle-high-contrast```
@@ -1,8 +0,0 @@
1
- module.exports = {
2
- status: 'ready',
3
-
4
- context: {
5
- button_text: 'Toggle high contrast',
6
- trigger_class: 'js-toggle-high-contrast'
7
- }
8
- }
@@ -1,10 +0,0 @@
1
- const element = document.querySelector('.js-toggle-high-contrast');
2
-
3
- function classToggle() {
4
- const body = document.querySelector('body');
5
- body.classList.toggle('high-contrast');
6
- }
7
-
8
- if (element) {
9
- element.addEventListener('click', classToggle);
10
- }