@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,20 +1,30 @@
1
- @charset 'UTF-8';
2
-
3
- @include molecule(natural-language-form) {
1
+ @charset "UTF-8";
2
+ @use "sass:meta";
3
+ @use '../../configurations/mixins' as mixin;
4
+ @use '../../configurations/bem' as bem;
5
+ @use '../../configurations/config' as config;
6
+ @use '../../configurations/variables' as var;
7
+ @use '../../configurations/functions' as func;
8
+ @use '../../configurations/colors/colors' as colors;
9
+ @use '../../configurations/colors/colors-functions' as colorFunc;
10
+ @use '../../vendor/grid/breakpoints' as breakpoint;
11
+ @use '../../vendor/grid/grid' as grid;
12
+
13
+ @include mixin.molecule(natural-language-form) {
4
14
  display: inline-block;
5
15
  position: relative;
6
16
 
7
- @include m(arrow) {
8
- @include e(label) {
9
- padding-right: rhythm(4);
17
+ @include bem.m(arrow) {
18
+ @include bem.e(label) {
19
+ padding-right: func.rhythm(4);
10
20
  border-bottom: 2px solid currentColor;
11
21
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' id='icon-arrow-down' viewBox='0 0 32 18.9' width='100%25' height='100%25'%3E%3Cpolygon points='32,2.9 16,18.9 0,2.9 2.9,0 16,13.1 29.1,0 '%3E%3C/polygon%3E%3C/svg%3E%0A");
12
22
  background-repeat: no-repeat;
13
23
  background-position: calc(95%) 60%;
14
- background-size: $icon-size-medium $icon-size-medium;
24
+ background-size: var.$icon-size-medium var.$icon-size-medium;
15
25
  text-decoration: none;
16
26
 
17
- @if variable-exists(cyberspace-color) {
27
+ @if meta.variable-exists(cyberspace-color) {
18
28
  @media (prefers-color-scheme: dark) {
19
29
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' id='icon-arrow-down' fill='%23ffffff' viewBox='0 0 32 18.9' width='100%25' height='100%25'%3E%3Cpolygon points='32,2.9 16,18.9 0,2.9 2.9,0 16,13.1 29.1,0 '%3E%3C/polygon%3E%3C/svg%3E%0A");
20
30
  }
@@ -36,29 +46,29 @@
36
46
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' id='icon-arrow-down' fill='%23f99963' viewBox='0 0 32 18.9' width='100%25' height='100%25'%3E%3Cpolygon points='32,2.9 16,18.9 0,2.9 2.9,0 16,13.1 29.1,0 '%3E%3C/polygon%3E%3C/svg%3E%0A");
37
47
  }
38
48
 
39
- @include bp-up(sm) {
49
+ @include breakpoint.bp-up(sm) {
40
50
  border-bottom: 4px solid currentColor;
41
51
  background-position: calc(100%) 60%;
42
52
  }
43
53
 
44
- @include bp-up(lg) {
54
+ @include breakpoint.bp-up(lg) {
45
55
  border-bottom: 5px solid currentColor;
46
56
  }
47
57
  }
48
58
  }
49
59
 
50
- @include e(select) {
60
+ @include bem.e(select) {
51
61
  position: absolute;
52
62
  top: 0;
53
63
  right: 0;
54
64
  bottom: 0;
55
65
  left: 0;
56
- padding-right: rhythm(4);
66
+ padding-right: func.rhythm(4);
57
67
  opacity: 0;
58
68
  cursor: pointer;
59
69
  }
60
70
 
61
- @include e(label) {
71
+ @include bem.e(label) {
62
72
  display: inline-block;
63
73
  font-family: inherit;
64
74
  font-size: inherit;
@@ -66,27 +76,27 @@
66
76
  cursor: pointer;
67
77
 
68
78
  option:not(:checked) {
69
- color: $color-cyberspace;
79
+ color: colors.$color-cyberspace;
70
80
  }
71
81
 
72
82
  &[data-color='ocean'] {
73
- color: $color-ocean;
83
+ color: colors.$color-ocean;
74
84
  }
75
85
 
76
86
  &[data-color='peacock'] {
77
- color: $color-peacock;
87
+ color: colors.$color-peacock;
78
88
  }
79
89
 
80
90
  &[data-color='jade'] {
81
- color: $color-jade;
91
+ color: colors.$color-jade;
82
92
  }
83
93
 
84
94
  &[data-color='sandstone'] {
85
- color: $color-sandstone;
95
+ color: colors.$color-sandstone;
86
96
  }
87
97
  }
88
98
 
89
- @include e(input) {
99
+ @include bem.e(input) {
90
100
  position: relative;
91
101
  z-index: 1;
92
102
  top: 0;
@@ -101,19 +111,19 @@
101
111
  cursor: pointer;
102
112
 
103
113
  &[data-color='ocean'] {
104
- color: $color-ocean;
114
+ color: colors.$color-ocean;
105
115
  }
106
116
 
107
117
  &[data-color='peacock'] {
108
- color: $color-peacock;
118
+ color: colors.$color-peacock;
109
119
  }
110
120
 
111
121
  &[data-color='jade'] {
112
- color: $color-jade;
122
+ color: colors.$color-jade;
113
123
  }
114
124
  }
115
125
 
116
- @include e(temp-text) {
126
+ @include bem.e(temp-text) {
117
127
  position: absolute;
118
128
  z-index: -1;
119
129
  top: 0;
@@ -1,48 +1,57 @@
1
1
  @charset "UTF-8";
2
-
3
- @include molecule(overview-navigation) {
2
+ @use '../../configurations/mixins' as mixin;
3
+ @use '../../configurations/bem' as bem;
4
+ @use '../../configurations/config' as config;
5
+ @use '../../configurations/variables' as var;
6
+ @use '../../configurations/functions' as func;
7
+ @use '../../configurations/colors/colors' as colors;
8
+ @use '../../configurations/colors/colors-functions' as colorFunc;
9
+ @use '../../vendor/grid/breakpoints' as breakpoint;
10
+ @use '../../vendor/grid/grid' as grid;
11
+
12
+ @include mixin.molecule(overview-navigation) {
4
13
  overflow: visible;
5
14
  min-width: 300px;
6
15
  max-width: 453px;
7
16
  display: flex;
8
17
  flex-direction: column;
9
- border-radius: $border-radius;
18
+ border-radius: var.$border-radius;
10
19
  transition: left 0.25s ease-out, top 0.5s ease-out;
11
- box-shadow: 0 0 0 1px $color-ash;
20
+ box-shadow: 0 0 0 1px colors.$color-ash;
12
21
 
13
- @include e(list) {
22
+ @include bem.e(list) {
14
23
  overflow: hidden;
15
- border-radius: $border-radius;
16
- background-color: $color-snow;
24
+ border-radius: var.$border-radius;
25
+ background-color: colors.$color-snow;
17
26
  margin: 0;
18
27
  padding: 0;
19
28
  width: 100%;
20
- max-height: calc(100dvh - rem(130px));
29
+ max-height: calc(100dvh - func.to_rem(130px));
21
30
  overflow-y: auto;
22
31
  }
23
32
 
24
- @include e(title) {
25
- margin-bottom: rhythm(2);
33
+ @include bem.e(title) {
34
+ margin-bottom: func.rhythm(2);
26
35
  }
27
36
 
28
- @include e(item) {
37
+ @include bem.e(item) {
29
38
  display: flex;
30
39
  align-items: center;
31
- margin-top: rhythm(1);
32
- margin-bottom: rhythm(1);
40
+ margin-top: func.rhythm(1);
41
+ margin-bottom: func.rhythm(1);
33
42
  margin-left: 0;
34
43
 
35
44
  &:last-child {
36
- margin-bottom: rhythm(3);
45
+ margin-bottom: func.rhythm(3);
37
46
  }
38
47
  }
39
48
 
40
- @include e(item__link) {
41
- padding: 0 rhythm(2);
49
+ @include bem.e(item__link) {
50
+ padding: 0 func.rhythm(2);
42
51
  border: none;
43
52
  border-radius: 0;
44
53
  background-color: initial;
45
- color: $color-cyberspace;
54
+ color: colors.$color-cyberspace;
46
55
  display: flex;
47
56
  align-items: center;
48
57
  text-decoration: none;
@@ -56,14 +65,14 @@
56
65
  }
57
66
 
58
67
  > svg {
59
- height: $icon-size-small;
60
- width: $icon-size-small;
61
- margin-right: rhythm(1);
68
+ height: var.$icon-size-small;
69
+ width: var.$icon-size-small;
70
+ margin-right: func.rhythm(1);
62
71
  flex-shrink: 0;
63
72
  }
64
73
  }
65
74
 
66
- @include e(button) {
75
+ @include bem.e(button) {
67
76
  position: fixed;
68
77
  bottom: auto;
69
78
  right: auto;
@@ -72,15 +81,15 @@
72
81
  pointer-events: none;
73
82
  padding: 0;
74
83
  border: 0;
75
- width: rem(60px);
76
- height: rem(60px);
84
+ width: func.to_rem(60px);
85
+ height: func.to_rem(60px);
77
86
  flex-shrink: 0;
78
87
  flex-grow: 0;
79
88
  align-items: center;
80
89
  justify-content: center;
81
90
  border-radius: 50%;
82
- background-color: $color-snow;
83
- box-shadow: inset 0 0 0 4px currentColor, 0 0 0 1px $color-snow, 0 0 6px rgba($color-cyberspace, 30%);
91
+ background-color: colors.$color-snow;
92
+ box-shadow: inset 0 0 0 4px currentColor, 0 0 0 1px colors.$color-snow, 0 0 6px rgba(colors.$color-cyberspace, 30%);
84
93
 
85
94
  &:hover,
86
95
  &:focus {
@@ -89,8 +98,8 @@
89
98
 
90
99
 
91
100
  > svg {
92
- width: $icon-size-large;
93
- height: $icon-size-large;
101
+ width: var.$icon-size-large;
102
+ height: var.$icon-size-large;
94
103
  flex-shrink: 0;
95
104
  opacity: 1;
96
105
 
@@ -102,28 +111,28 @@
102
111
  &::after {
103
112
  content: attr(data-title);
104
113
  position: absolute;
105
- bottom: -#{rhythm(3)};
114
+ bottom: -#{func.rhythm(3)};
106
115
  text-transform: uppercase;
107
116
  text-align: center;
108
- font-size: $size-small;
109
- font-family: $font-family-mono;
110
- text-shadow: 0 1px 0 $color-snow;
111
- color: $color-cyberspace;
112
- background-color: $color-snow;
113
- border-radius: $border-radius;
114
- padding-left: rhythm(0.5);
115
- padding-right: rhythm(0.5);
117
+ font-size: var.$size-small;
118
+ font-family: var.$font-family-mono;
119
+ text-shadow: 0 1px 0 colors.$color-snow;
120
+ color: colors.$color-cyberspace;
121
+ background-color: colors.$color-snow;
122
+ border-radius: var.$border-radius;
123
+ padding-left: func.rhythm(0.5);
124
+ padding-right: func.rhythm(0.5);
116
125
  }
117
126
 
118
127
  &.is-fixed {
119
- //top: calc(100vh - rhythm(11)) !important;
128
+ //top: calc(100vh - func.rhythm(11)) !important;
120
129
  //top: auto !important;
121
- bottom: calc(env(safe-area-inset-bottom) + rhythm(5)) !important;
130
+ bottom: calc(env(safe-area-inset-bottom) + func.rhythm(5)) !important;
122
131
  //left: auto !important;
123
- right: rhythm(2) !important;
132
+ right: func.rhythm(2) !important;
124
133
  pointer-events: auto;
125
134
 
126
- @include bp-up(xxl) {
135
+ @include breakpoint.bp-up(xxl) {
127
136
  //left: auto !important;
128
137
  right: calc(50vw - 680px) !important;
129
138
  }
@@ -160,14 +169,14 @@
160
169
 
161
170
  &.is-minimized {
162
171
  position: fixed;
163
- right: rhythm(2);
164
- bottom: rhythm(13);
165
- z-index: z_index(foregroundMinus);
172
+ right: func.rhythm(2);
173
+ bottom: func.rhythm(13);
174
+ z-index: func.z_index(foregroundMinus);
166
175
  margin-top: 0;
167
176
  margin-bottom: 0;
168
- margin-left: rhythm(2);
177
+ margin-left: func.rhythm(2);
169
178
 
170
- @include bp-up(xxl) {
179
+ @include breakpoint.bp-up(xxl) {
171
180
  right: calc(50vw - 680px) !important;
172
181
  }
173
182
  }
@@ -1 +1 @@
1
- @import 'https://static.internetstiftelsen.se/styles/readspeaker/skins/iisReadSpeakerSkin/iisReadSpeakerSkin.css?ver=1.0.0';
1
+ @use 'https://static.internetstiftelsen.se/styles/readspeaker/skins/iisReadSpeakerSkin/iisReadSpeakerSkin.css?ver=1.0.0';
@@ -1,10 +1,18 @@
1
- @charset 'UTF-8';
2
-
3
- @include molecule(share) {
4
- @include e(platforms) {
1
+ @charset "UTF-8";
2
+ @use '../../configurations/mixins' as mixin;
3
+ @use '../../configurations/bem' as bem;
4
+ @use '../../configurations/config' as config;
5
+ @use '../../configurations/variables' as var;
6
+ @use '../../configurations/functions' as func;
7
+ @use '../../configurations/colors/colors' as colors;
8
+ @use '../../configurations/colors/colors-functions' as colorFunc;
9
+ @use '../../vendor/grid/breakpoints' as breakpoint;
10
+
11
+ @include mixin.molecule(share) {
12
+ @include bem.e(platforms) {
5
13
  visibility: visible;
6
14
  max-height: 80rem;
7
- padding: rhythm(1) 0;
15
+ padding: func.rhythm(1) 0;
8
16
  overflow: hidden;
9
17
  transition:
10
18
  visibility 0s ease-out,
@@ -21,33 +29,33 @@
21
29
  }
22
30
  }
23
31
 
24
- @include e(button) {
32
+ @include bem.e(button) {
25
33
  padding-left: 0;
26
34
  }
27
35
 
28
- @include e(icon) {
29
- margin-right: rhythm(2);
36
+ @include bem.e(icon) {
37
+ margin-right: func.rhythm(2);
30
38
  padding: 0;
31
39
 
32
- @include b(icon) {
33
- width: $icon-size * 1.5;
34
- height: $icon-size * 1.5;
40
+ @include bem.b(icon) {
41
+ width: var.$icon-size * 1.5;
42
+ height: var.$icon-size * 1.5;
35
43
 
36
44
  &.icon-facebook {
37
- fill: $color-facebook;
45
+ fill: colors.$color-facebook;
38
46
  }
39
47
 
40
48
  &.icon-twitter {
41
- fill: $color-twitter;
49
+ fill: colors.$color-twitter;
42
50
  }
43
51
 
44
52
  &.icon-linkedin {
45
- fill: $color-linkedin;
53
+ fill: colors.$color-linkedin;
46
54
  }
47
55
  }
48
56
  }
49
57
 
50
- @include m(inline) {
58
+ @include bem.m(inline) {
51
59
  display: inline-flex;
52
60
  align-items: center;
53
61
  }
@@ -1,26 +1,34 @@
1
1
  @charset "UTF-8";
2
-
3
2
  @use "sass:math";
4
3
  @use "sass:color";
5
-
6
- @include molecule(submenu) {
7
- margin: 0 0 rhythm(2) 0;
4
+ @use '../../configurations/mixins' as mixin;
5
+ @use '../../configurations/bem' as bem;
6
+ @use '../../configurations/config' as config;
7
+ @use '../../configurations/variables' as var;
8
+ @use '../../configurations/functions' as func;
9
+ @use '../../configurations/colors/colors' as colors;
10
+ @use '../../configurations/colors/colors-functions' as colorFunc;
11
+ @use '../../vendor/grid/breakpoints' as breakpoint;
12
+ @use '../../vendor/grid/grid' as grid;
13
+
14
+ @include mixin.molecule(submenu) {
15
+ margin: 0 0 func.rhythm(2) 0;
8
16
  padding: 0;
9
17
  overflow: hidden;
10
- border-radius: $border-radius;
11
- background-color: $color-snow;
18
+ border-radius: var.$border-radius;
19
+ background-color: colors.$color-snow;
12
20
  list-style: none;
13
21
 
14
- @include e(title) {
22
+ @include bem.e(title) {
15
23
  background-color: var(--m-submenu-background-color);
16
24
 
17
- @include e(link) {
25
+ @include bem.e(link) {
18
26
  display: flex;
19
27
  align-items: center;
20
28
  justify-content: space-between;
21
- padding: rhythm(2);
22
- color: $color-cyberspace;
23
- font-family: $font-family-headings;
29
+ padding: func.rhythm(2);
30
+ color: colors.$color-cyberspace;
31
+ font-family: var.$font-family-headings;
24
32
  text-decoration: none;
25
33
 
26
34
  &:hover,
@@ -34,47 +42,47 @@
34
42
 
35
43
  > svg {
36
44
  flex-shrink: 0;
37
- width: $icon-size-small;
38
- height: $icon-size-small;
39
- margin-left: rhythm(1);
45
+ width: var.$icon-size-small;
46
+ height: var.$icon-size-small;
47
+ margin-left: func.rhythm(1);
40
48
  transform: rotate(-90deg);
41
49
  }
42
50
 
43
- @include bp-up(md) {
44
- padding: rhythm(2) rhythm(3);
51
+ @include breakpoint.bp-up(md) {
52
+ padding: func.rhythm(2) func.rhythm(3);
45
53
 
46
54
  > svg {
47
- width: $icon-size-medium;
48
- height: $icon-size-medium;
55
+ width: var.$icon-size-medium;
56
+ height: var.$icon-size-medium;
49
57
  }
50
58
  }
51
59
  }
52
60
  }
53
61
 
54
- @include e(item) {
62
+ @include bem.e(item) {
55
63
  margin: 0;
56
64
  padding: 0;
57
65
 
58
66
  & + & {
59
- border-top: 1px solid $color-ash;
67
+ border-top: 1px solid colors.$color-ash;
60
68
  }
61
69
 
62
70
  &:last-child {
63
71
  > a {
64
- padding-bottom: rhythm(2);
72
+ padding-bottom: func.rhythm(2);
65
73
 
66
- @include bp-up(md) {
67
- padding-bottom: rhythm(3);
74
+ @include breakpoint.bp-up(md) {
75
+ padding-bottom: func.rhythm(3);
68
76
  }
69
77
  }
70
78
  }
71
79
 
72
- @include e(link) {
80
+ @include bem.e(link) {
73
81
  display: flex;
74
82
  position: relative;
75
83
  align-items: center;
76
84
  justify-content: space-between;
77
- padding: rhythm(1) rhythm(6) rhythm(1) rhythm(2);
85
+ padding: func.rhythm(1) func.rhythm(6) func.rhythm(1) func.rhythm(2);
78
86
  overflow: hidden;
79
87
  color: var(--m-submenu-icon-fill-color);
80
88
  text-decoration: none;
@@ -92,28 +100,28 @@
92
100
  display: none;
93
101
  position: absolute;
94
102
  top: 50%;
95
- right: rhythm(2);
103
+ right: func.rhythm(2);
96
104
  flex-shrink: 0;
97
- width: $icon-size;
98
- height: $icon-size;
99
- margin-left: rhythm(1);
100
- padding: rhythm(0.5);
105
+ width: var.$icon-size;
106
+ height: var.$icon-size;
107
+ margin-left: func.rhythm(1);
108
+ padding: func.rhythm(0.5);
101
109
  overflow: hidden;
102
110
  transform: translateY(-50%);
103
111
  border-radius: 50%;
104
112
  background-color: var(--m-submenu-icon-background-hover-color);
105
113
  fill: var(--m-submenu-icon-fill-color);
106
114
 
107
- @include bp-up(md) {
108
- right: rhythm(3);
109
- width: $icon-size * 1.6;
110
- height: $icon-size * 1.6;
111
- padding: rhythm(1);
115
+ @include breakpoint.bp-up(md) {
116
+ right: func.rhythm(3);
117
+ width: var.$icon-size * 1.6;
118
+ height: var.$icon-size * 1.6;
119
+ padding: func.rhythm(1);
112
120
  }
113
121
  }
114
122
 
115
123
  &.is-current {
116
- font-family: $font-family-headings;
124
+ font-family: var.$font-family-headings;
117
125
  pointer-events: none;
118
126
 
119
127
  > svg {
@@ -121,30 +129,30 @@
121
129
  }
122
130
  }
123
131
 
124
- @include bp-up(md) {
125
- padding: rhythm(2) rhythm(7) rhythm(2) rhythm(3);
132
+ @include breakpoint.bp-up(md) {
133
+ padding: func.rhythm(2) func.rhythm(7) func.rhythm(2) func.rhythm(3);
126
134
  }
127
135
 
128
- @include m(has-sublevel) {
136
+ @include bem.m(has-sublevel) {
129
137
  display: flex;
130
138
  flex-grow: 1;
131
139
  }
132
140
  }
133
141
 
134
- @include e(sublevel) {
142
+ @include bem.e(sublevel) {
135
143
  display: flex;
136
144
  justify-content: space-between;
137
145
  }
138
146
 
139
- @include e(toggle-button) {
147
+ @include bem.e(toggle-button) {
140
148
  display: flex;
141
149
  position: relative;
142
150
  position: relative;
143
151
  align-items: center;
144
152
  margin: 0;
145
- padding: rhythm(1) rhythm(3);
153
+ padding: func.rhythm(1) func.rhythm(3);
146
154
  border: 0;
147
- border-left: 1px solid color.adjust($color-ash, $lightness: -5%);
155
+ border-left: 1px solid color.adjust(colors.$color-ash, $lightness: -5%);
148
156
  background-color: transparent;
149
157
 
150
158
  &::before,
@@ -152,13 +160,13 @@
152
160
  content: '';
153
161
  display: block;
154
162
  position: absolute;
155
- top: rem(22px);
156
- right: rem(25px);
157
- width: math.div($icon-size-small, 1.5);
163
+ top: func.to_rem(22px);
164
+ right: func.to_rem(25px);
165
+ width: math.div(var.$icon-size-small, 1.5);
158
166
  height: 2px;
159
167
  transform-origin: center center;
160
168
  transition: transform 0.25s ease-out;
161
- background-color: $color-cyberspace;
169
+ background-color: colors.$color-cyberspace;
162
170
  }
163
171
 
164
172
  &::before {
@@ -166,13 +174,13 @@
166
174
  }
167
175
 
168
176
  &::after {
169
- right: rem(18px);
177
+ right: func.to_rem(18px);
170
178
  transform: rotate(-45deg);
171
179
  }
172
180
 
173
181
  &[aria-expanded='true'] {
174
182
  margin-bottom: -1px;
175
- background-color: color.adjust($color-ash, $lightness: 3%);
183
+ background-color: color.adjust(colors.$color-ash, $lightness: 3%);
176
184
 
177
185
  &::after {
178
186
  transform: rotate(-135deg);
@@ -184,32 +192,32 @@
184
192
  }
185
193
 
186
194
  &:hover {
187
- background-color: color.adjust($color-ash, $lightness: 3%);
195
+ background-color: color.adjust(colors.$color-ash, $lightness: 3%);
188
196
  }
189
197
 
190
- @include bp-up(md) {
191
- padding: rhythm(2) rhythm(4);
198
+ @include breakpoint.bp-up(md) {
199
+ padding: func.rhythm(2) func.rhythm(4);
192
200
 
193
201
  &::before,
194
202
  &::after {
195
- top: rem(31px);
196
- right: rem(33px);
197
- width: $icon-size-small;
203
+ top: func.to_rem(31px);
204
+ right: func.to_rem(33px);
205
+ width: var.$icon-size-small;
198
206
  height: 3px;
199
207
  }
200
208
 
201
209
  &::after {
202
- right: rem(23px);
210
+ right: func.to_rem(23px);
203
211
  }
204
212
  }
205
213
  }
206
214
  }
207
215
 
208
- @include e(sublevel) {
216
+ @include bem.e(sublevel) {
209
217
  margin: 0;
210
218
  padding: 0;
211
- border-top: 1px solid color.adjust($color-ash, $lightness: -3%);
212
- background-color: color.adjust($color-ash, $lightness: 3%);
219
+ border-top: 1px solid color.adjust(colors.$color-ash, $lightness: -3%);
220
+ background-color: color.adjust(colors.$color-ash, $lightness: 3%);
213
221
  list-style: none;
214
222
 
215
223
  &[aria-hidden='true'] {
@@ -217,24 +225,24 @@
217
225
  border-top: 1px solid transparent;
218
226
  }
219
227
 
220
- @include e(item) {
228
+ @include bem.e(item) {
221
229
  margin: 0;
222
- padding: 0 rhythm(1.5);
230
+ padding: 0 func.rhythm(1.5);
223
231
 
224
232
  & + & {
225
- border-top: 1px solid color.adjust($color-ash, $lightness: -4%);
233
+ border-top: 1px solid color.adjust(colors.$color-ash, $lightness: -4%);
226
234
  }
227
235
 
228
236
  /* Support for icon on sublevel */
229
237
 
230
- @include e(link) {
238
+ @include bem.e(link) {
231
239
  > svg {
232
240
  display: none;
233
- padding: rhythm(0.5);
234
- background-color: $color-concrete;
241
+ padding: func.rhythm(0.5);
242
+ background-color: colors.$color-concrete;
235
243
 
236
- @include bp-up(md) {
237
- padding: rhythm(1);
244
+ @include breakpoint.bp-up(md) {
245
+ padding: func.rhythm(1);
238
246
  }
239
247
  }
240
248
 
@@ -255,11 +263,11 @@
255
263
  }
256
264
 
257
265
  25% {
258
- transform: translateY(-#{rhythm(0.5)}) rotate(-90deg);
266
+ transform: translateY(-#{func.rhythm(0.5)}) rotate(-90deg);
259
267
  }
260
268
 
261
269
  75% {
262
- transform: translateY(rhythm(0.5)) rotate(-90deg);
270
+ transform: translateY(func.rhythm(0.5)) rotate(-90deg);
263
271
  }
264
272
 
265
273
  100% {