@ilo-org/styles 1.4.0 → 1.6.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 (48) hide show
  1. package/css/components/button.css +1 -1
  2. package/css/components/card.css +1 -1
  3. package/css/components/datacard.css +1 -1
  4. package/css/components/detailcard.css +1 -1
  5. package/css/components/featurecard.css +1 -1
  6. package/css/components/languagetoggle.css +1 -1
  7. package/css/components/multilinkcard.css +1 -1
  8. package/css/components/profile.css +1 -1
  9. package/css/components/scorecard.css +1 -0
  10. package/css/components/status.css +1 -0
  11. package/css/components/tag.css +1 -1
  12. package/css/components/textcard.css +1 -1
  13. package/css/components/video.css +1 -1
  14. package/css/global.css +1 -1
  15. package/css/global.css.map +1 -1
  16. package/css/index.css +2 -2
  17. package/css/index.css.map +1 -1
  18. package/css/monorepo.css +2 -2
  19. package/css/monorepo.css.map +1 -1
  20. package/package.json +2 -2
  21. package/scss/_mixins.scss +167 -11
  22. package/scss/components/_button.scss +23 -115
  23. package/scss/components/_card.scss +152 -156
  24. package/scss/components/_datacard.scss +5 -0
  25. package/scss/components/_detailcard.scss +75 -113
  26. package/scss/components/_featurecard.scss +58 -100
  27. package/scss/components/_languagetoggle.scss +24 -5
  28. package/scss/components/_multilinkcard.scss +12 -2
  29. package/scss/components/_profile.scss +65 -105
  30. package/scss/components/_scorecard.scss +177 -0
  31. package/scss/components/_status.scss +51 -0
  32. package/scss/components/_tag.scss +60 -149
  33. package/scss/components/_textcard.scss +5 -62
  34. package/scss/components/_video.scss +2 -2
  35. package/scss/components/index.scss +3 -0
  36. package/scss/components/navigation/_nav-compact.scss +186 -0
  37. package/scss/components/navigation/_nav-complex.scss +256 -0
  38. package/scss/components/navigation/_nav-dropdown.scss +44 -0
  39. package/scss/components/navigation/_nav-grid.scss +31 -0
  40. package/scss/components/navigation/_nav-menu.scss +91 -0
  41. package/scss/components/navigation/index.scss +6 -0
  42. package/scss/components/navigation/mobile/_nav-mobile-drawer.scss +60 -0
  43. package/scss/components/navigation/mobile/_nav-mobile-menu.scss +36 -0
  44. package/scss/components/navigation/mobile/_nav-mobile.scss +171 -0
  45. package/scss/components/navigation/mobile/index.scss +3 -0
  46. package/scss/theme/_breakpoints.scss +2 -2
  47. package/scss/theme/_foundation.scss +2 -22
  48. package/scss/theme/_typography.scss +53 -0
@@ -3,93 +3,47 @@
3
3
  @use "../animations" as *;
4
4
  @import "../mixins";
5
5
 
6
+ @mixin card-drop-shadow {
7
+ filter: drop-shadow(0px -4px 16px rgba(30, 45, 190, 0.05))
8
+ drop-shadow(0px 10px 20px rgba(30, 45, 190, 0.08))
9
+ drop-shadow(0px 4px 8px rgba(30, 45, 190, 0.05))
10
+ drop-shadow(0px 0.8px 1.6px rgba(30, 45, 190, 0.04));
11
+ }
12
+
13
+ $card-transitions: "color, background-color, border-color, opacity, fill, filter";
14
+
15
+ $link-hover-selectors: ".ilo--card--link:hover, .ilo--card--link:focus, .ilo--card--link:focus-within";
16
+
17
+ @mixin card-link-hover {
18
+ &:has(#{$link-hover-selectors}) {
19
+ @content;
20
+ }
21
+ }
22
+
6
23
  .ilo--card {
7
24
  $self: &;
8
25
  $transition-timing: 250ms;
26
+
9
27
  box-sizing: border-box;
10
28
  position: relative;
11
29
  background-color: var(--ilo-color-white);
12
-
13
- // Max width is set in the invididual card types unless fluid
14
30
  max-width: var(--max-width);
15
31
  flex: 1 1 var(--max-width);
32
+ @include globaltransition("border-bottom, filter");
16
33
 
17
34
  * {
18
- @include globaltransition("color, background-color, border-color, opacity");
19
- }
20
-
21
- &__size__fluid {
22
- --max-width: 100% !important;
23
- }
24
-
25
- &__action:hover,
26
- &__action:focus,
27
- &__action:focus-within {
28
- // background: var(--ilo-color-white);
29
- outline: none;
30
- text-decoration: none;
31
-
32
- // &#{$self}__dark {
33
- // background: var(--ilo-color-white);
34
- // }
35
-
36
- #{$self}--eyebrow,
37
- #{$self}--title,
38
- #{$self}--intro,
39
- #{$self}--date,
40
- #{$self}--date-extra {
41
- color: var(--ilo-color-blue);
42
- }
35
+ @include globaltransition($card-transitions);
43
36
  }
44
37
 
45
- &__theme {
46
- &__light {
47
- background: var(--ilo-color-white);
48
- }
49
-
50
- &__dark {
51
- background: var(--ilo-color-blue-dark);
38
+ @include card-link-hover {
39
+ @include card-drop-shadow;
52
40
 
53
- #{$self}--eyebrow,
54
- #{$self}--title,
55
- #{$self}--intro,
56
- #{$self}--date,
57
- #{$self}--eventdate {
58
- color: var(--ilo-color-gray-light);
59
- }
41
+ #{$self}--image--wrapper::before {
42
+ opacity: 0.4;
60
43
  }
61
44
 
62
- &__soft {
63
- background: var(--ilo-color-blue-lighter);
64
- }
65
- }
66
-
67
- &__isvideo {
68
- #{$self}--image--wrapper {
69
- position: relative;
70
-
71
- &::before,
72
- &::after {
73
- background-position: center;
74
- background-size: 18px 20px;
75
- background-repeat: no-repeat;
76
- content: "";
77
- display: block;
78
- height: 40px;
79
- left: 0;
80
- position: absolute;
81
- top: 0;
82
- width: 40px;
83
- z-index: 1;
84
- }
85
-
86
- &::before {
87
- background-color: var(--ilo-color-gray-charcoal);
88
- }
89
-
90
- &::after {
91
- @include icon("caret_right", var(--ilo-color-gray-light));
92
- }
45
+ #{$self}--picture {
46
+ filter: saturate(0);
93
47
  }
94
48
  }
95
49
 
@@ -97,130 +51,172 @@
97
51
  height: 100%;
98
52
  }
99
53
 
54
+ // The outer element for cards with corner cut
100
55
  &--wrapper {
101
56
  max-width: var(--max-width);
102
- transition: filter $transition-timing ease-out;
57
+ @include globaltransition($card-transitions);
103
58
 
104
- &:hover,
105
- &:focus,
106
- &:focus-within {
59
+ @include card-link-hover {
107
60
  @include card-drop-shadow;
108
61
  }
109
62
  }
110
63
 
64
+ &--image--wrapper {
65
+ position: relative;
66
+ &::before {
67
+ content: "";
68
+ position: absolute;
69
+ background-color: var(--ilo-color-blue);
70
+ height: 100%;
71
+ width: 100%;
72
+ z-index: 1;
73
+ top: 0;
74
+ left: 0;
75
+ opacity: 0;
76
+ @include globaltransition("opacity");
77
+ }
78
+ }
79
+
111
80
  &--link {
112
81
  background: none;
113
82
  color: transparent;
114
- height: 100%;
115
- left: 0;
116
83
  position: absolute;
117
- text-decoration: none;
118
84
  top: 0;
85
+ left: 0;
119
86
  width: 100%;
87
+ height: 100%;
88
+ text-decoration: none;
120
89
  z-index: 2;
121
90
 
122
- &:hover,
123
- &:focus,
124
- &:focus-within {
125
- outline: none;
126
-
127
- + #{$self}--wrap {
128
- #{$self}--eyebrow {
129
- color: var(--ilo-color-blue);
130
- }
131
-
132
- #{$self}--title {
133
- color: var(--ilo-color-blue);
134
- }
135
-
136
- #{$self}--intro {
137
- color: var(--ilo-color-blue);
138
- }
139
-
140
- #{$self}--date {
141
- color: var(--ilo-color-blue);
142
- }
143
-
144
- #{$self}--eventdate {
145
- color: var(--ilo-color-blue);
146
- }
147
- }
148
- }
149
-
150
91
  &--text {
151
92
  @include isVisuallyHidden();
152
93
  }
153
94
  }
154
95
 
155
96
  &--eyebrow {
156
- color: $brand-ilo-purple;
157
- @include font-styles("body-small");
158
- margin-bottom: spacing(3);
159
-
160
- #{$self}--link:hover &,
161
- #{$self}--link:focus &,
162
- #{$self}--link:focus-within & {
163
- color: var(--ilo-color-blue);
164
- }
97
+ color: var(--ilo-color-purple);
98
+ @include typography("body-small");
99
+ margin-bottom: spacing(4);
165
100
  }
166
101
 
167
102
  &--title {
168
- color: var(--ilo-color-blue-dark);
169
- font-family: var(--ilo-fonts-display);
170
- font-weight: 700;
171
- @include font-styles("headline-5");
172
- @include textmargin(
173
- "margin-bottom",
174
- 10px,
175
- "headline-5",
176
- "display",
177
- "body-small",
178
- "copy"
179
- );
180
-
181
- #{$self}--link:hover &,
182
- #{$self}--link:focus &,
183
- #{$self}--link:focus-within & {
184
- color: var(--ilo-color-blue);
185
- }
103
+ color: var(--ilo-color-dark-blue);
104
+ @include typography("heading-4");
105
+ margin-bottom: spacing(6);
186
106
  }
187
107
 
188
108
  &--intro {
189
109
  color: var(--ilo-color-gray-charcoal);
190
- @include font-styles("body-small");
191
- margin-bottom: spacing(8);
192
-
193
- #{$self}--link:hover &,
194
- #{$self}--link:focus &,
195
- #{$self}--link:focus-within & {
196
- color: var(--ilo-color-blue);
197
- }
110
+ @include typography("body-large");
198
111
  }
199
112
 
200
113
  &--date {
201
- color: $brand-ilo-grey-accessible;
202
- @include font-styles("body-small");
203
- @include textmargin("margin-bottom", 30px, "body-small", "copy", 0, 0);
204
-
205
- #{$self}--link:hover &,
206
- #{$self}--link:focus &,
207
- #{$self}--link:focus-within & {
208
- color: var(--ilo-color-blue);
209
- }
114
+ color: var(--ilo-gray-accessible);
115
+ @include typography("body-small");
116
+ margin-bottom: spacing(6);
210
117
  }
211
118
 
212
119
  &--event-date {
213
- @include font-styles("body-small");
214
- @include textmargin("margin-bottom", 30px, "body-small", "copy", 0, 0);
120
+ @include typography("body-small");
215
121
  }
216
122
 
217
- &--picture {
218
- max-width: 100%;
219
- width: 100%;
123
+ &--content--item {
124
+ @include typography("body-small");
220
125
  }
221
126
 
222
127
  &--cta {
223
128
  position: relative;
224
129
  z-index: 2;
225
130
  }
131
+
132
+ &__theme {
133
+ &__light {
134
+ background: var(--ilo-color-white);
135
+ border-bottom: px-to-rem(3px) solid var(--ilo-color-gray-base);
136
+ }
137
+
138
+ &__soft {
139
+ background: var(--ilo-color-blue-lighter);
140
+ }
141
+
142
+ &__light,
143
+ &__soft {
144
+ @include card-link-hover {
145
+ border-bottom: px-to-rem(3px) solid var(--ilo-color-blue);
146
+
147
+ #{$self}--eyebrow,
148
+ #{$self}--title,
149
+ #{$self}--intro,
150
+ #{$self}--date,
151
+ #{$self}--date-extra,
152
+ #{$self}--content--item,
153
+ .ilo--profile {
154
+ color: var(--ilo-color-blue);
155
+
156
+ .ilo--icon {
157
+ fill: var(--ilo-color-blue);
158
+ }
159
+ }
160
+ }
161
+ }
162
+
163
+ &__dark {
164
+ background: var(--ilo-color-blue-dark);
165
+ border-bottom: px-to-rem(3px) solid var(--ilo-color-red);
166
+
167
+ @include card-link-hover {
168
+ border-bottom: px-to-rem(3px) solid var(--ilo-color-white);
169
+ }
170
+
171
+ #{$self}--title {
172
+ color: var(--ilo-color-white);
173
+ }
174
+
175
+ #{$self}--eyebrow,
176
+ #{$self}--intro,
177
+ #{$self}--date,
178
+ #{$self}--content--item {
179
+ color: var(--ilo-color-gray-light);
180
+ }
181
+
182
+ #{$self}--content--item {
183
+ .ilo--icon {
184
+ fill: var(--ilo-color-gray-light);
185
+ }
186
+ }
187
+ }
188
+ }
189
+
190
+ &__size {
191
+ &__fluid {
192
+ --max-width: 100% !important;
193
+ }
194
+ }
195
+
196
+ // Video style
197
+ &__isvideo {
198
+ #{$self}--image--wrapper {
199
+ position: relative;
200
+ &::before,
201
+ &::after {
202
+ content: "";
203
+ display: block;
204
+ position: absolute;
205
+ top: 0;
206
+ left: 0;
207
+ height: 40px;
208
+ width: 40px;
209
+ z-index: 1;
210
+ background-position: center;
211
+ background-size: 18px 20px;
212
+ background-repeat: no-repeat;
213
+ }
214
+ &::before {
215
+ background-color: var(--ilo-color-gray-charcoal);
216
+ }
217
+ &::after {
218
+ @include icon("caret_right", var(--ilo-color-gray-light));
219
+ }
220
+ }
221
+ }
226
222
  }
@@ -131,6 +131,11 @@
131
131
  max-width: 200px;
132
132
  }
133
133
 
134
+ #{$self}--picture {
135
+ max-width: 100%;
136
+ width: 100%;
137
+ }
138
+
134
139
  &--content-label {
135
140
  @include font-styles("body-xs");
136
141
  @include textmargin(
@@ -10,39 +10,27 @@
10
10
  &__detail {
11
11
  --max-width: #{px-to-rem(343px)};
12
12
 
13
- border-bottom: px-to-rem(3px) solid $brand-ilo-grey-light;
14
- padding: spacing(8) 0;
13
+ border-bottom: px-to-rem(3px) solid var(--ilo-color-gray-light);
14
+ padding: spacing(8) spacing(4);
15
15
  position: relative;
16
16
 
17
- @include globaltransition(border);
18
-
19
- @include breakpoint("lg") {
20
- padding: spacing(8) 0;
21
- }
22
-
23
- @include breakpoint("md", true) {
24
- --max-width: 100%;
17
+ #{$self}--wrap {
18
+ display: flex;
19
+ flex-flow: column;
25
20
  }
26
21
 
27
- &:hover,
28
- &:focus,
29
- &:focus-within {
30
- @include card-drop-shadow;
31
- border-bottom: px-to-rem(3px) solid $brand-ilo-blue;
22
+ #{$self}--image--wrapper {
23
+ width: px-to-rem(100px);
24
+ height: auto;
25
+ margin-bottom: spacing(8);
32
26
 
33
- picture::before {
34
- opacity: 0.4;
35
- z-index: 2;
27
+ picture {
28
+ display: flex;
36
29
  }
37
30
 
38
- #{$self}--date-extra {
39
- &::before {
40
- @include dataurlicon("caret_right", $brand-ilo-blue);
41
-
42
- [dir="rtl"] & {
43
- @include dataurlicon("caret_left", $brand-ilo-blue);
44
- }
45
- }
31
+ img {
32
+ width: 100%;
33
+ height: 100%;
46
34
  }
47
35
  }
48
36
 
@@ -54,116 +42,90 @@
54
42
  padding: 0 0 spacing(2) 0;
55
43
  @include font-styles("headline-6");
56
44
  @include breakpoint("lg") {
57
- #{$self}__size__wide & {
58
- @include font-styles("headline-5");
59
- }
60
-
61
45
  #{$self}__size__wide & {
62
46
  @include font-styles("headline-6");
63
47
  }
64
48
  }
65
49
  }
66
50
 
67
- &#{$self}__size {
68
- &__wide,
69
- &__fluid {
70
- --max-width: #{px-to-rem(745px)};
71
-
72
- #{$self}--title {
73
- @include breakpoint("lg") {
74
- @include font-styles("headline-5");
75
- }
76
- }
51
+ #{$self}--intro {
52
+ margin-bottom: spacing(8);
53
+ }
77
54
 
78
- #{$self}--image--wrapper {
79
- @include breakpoint("lg") {
80
- flex: 0 0 px-to-rem(196px);
81
- }
82
- }
55
+ #{$self}--date {
56
+ font-size: var(--ilo-font-size-sm);
57
+ line-height: var(--ilo-line-height-xlg);
58
+ letter-spacing: var(--ilo-letter-spacing-md);
59
+ color: var(--ilo-color-gray-accessible);
60
+ }
83
61
 
84
- #{$self}--picture {
85
- @include breakpoint("lg") {
86
- width: px-to-rem(196px);
87
- }
88
- }
62
+ #{$self}--date-extra {
63
+ font-size: var(--ilo-font-size-md);
64
+ line-height: var(--ilo-line-height-2xlg);
65
+ letter-spacing: var(--ilo-letter-spacing-md);
66
+ color: var(--ilo-color-gray-charcoal);
67
+ gap: spacing(2);
68
+
69
+ // this makes sure the para will be indented
70
+ // if it has to wrap on two lines
71
+ margin-inline-start: px-to-rem(-4px);
72
+ padding-inline-start: px-to-rem(24px);
73
+ text-indent: px-to-rem(-24px);
74
+
75
+ .ilo--icon {
76
+ display: inline-block;
77
+ position: relative;
78
+ vertical-align: sub;
79
+ top: px-to-rem(1px);
89
80
  }
81
+ }
90
82
 
83
+ &#{$self}__size {
91
84
  &__narrow {
92
85
  --max-width: #{px-to-rem(343px)};
93
-
94
- @include breakpoint("md", true) {
95
- --max-width: 100%;
96
- }
97
86
  }
98
- }
99
87
 
100
- picture {
101
- display: flex;
102
- position: relative;
103
-
104
- &::before {
105
- background-color: $brand-ilo-blue;
106
- content: "";
107
- display: block;
108
- height: 100%;
109
- left: 0;
110
- opacity: 0;
111
- position: absolute;
112
- top: 0;
113
- width: 100%;
114
- z-index: -1;
115
- @include globaltransition("opacity");
116
- }
117
- }
88
+ &__wide,
89
+ &__fluid {
90
+ @include breakpoint("md") {
91
+ --max-width: #{px-to-rem(745px)};
92
+ padding: spacing(8) spacing(4) spacing(8) spacing(0);
93
+
94
+ #{$self}--image--wrapper {
95
+ flex: 1 0 18%;
96
+ height: 100%;
97
+ margin: 0;
98
+ }
118
99
 
119
- #{$self}--wrap {
120
- display: flex;
121
- }
100
+ #{$self}--picture {
101
+ height: auto;
102
+ }
122
103
 
123
- #{$self}--title {
124
- @include font-styles("headline-6");
125
- }
104
+ #{$self}--wrap {
105
+ flex-flow: row;
106
+ gap: spacing(4);
107
+ }
108
+ }
126
109
 
127
- #{$self}--image--wrapper {
128
- flex: 0 0 px-to-rem(77px);
129
- }
110
+ @include breakpoint("lg") {
111
+ padding: spacing(8) spacing(6) spacing(8) spacing(0);
130
112
 
131
- #{$self}--picture {
132
- object-fit: contain;
133
- width: px-to-rem(77px);
134
- }
113
+ #{$self}--wrap {
114
+ gap: spacing(6);
115
+ }
135
116
 
136
- #{$self}--content {
137
- padding: 0 spacing(6);
138
- }
117
+ #{$self}--image--wrapper {
118
+ flex: 1 0 27%;
119
+ }
120
+ }
139
121
 
140
- #{$self}--date-extra {
141
- @include font-styles("body-small");
142
- margin-bottom: 0;
143
- padding-inline-start: spacing(5);
144
- position: relative;
145
-
146
- &::before {
147
- background-repeat: no-repeat;
148
- content: "";
149
- display: inline-block;
150
- height: px-to-rem(24px);
151
- left: -8px;
152
- top: 0;
153
- position: absolute;
154
- width: px-to-rem(24px);
155
- @include dataurlicon("caret_right", $brand-ilo-black);
156
-
157
- [dir="rtl"] & {
158
- @include dataurlicon("caret_left", $brand-ilo-black);
159
- right: -8px;
122
+ #{$self}--title {
123
+ @include breakpoint("lg") {
124
+ @include font-styles("headline-5");
125
+ }
160
126
  }
161
127
  }
162
128
  }
163
-
164
- #{$self}--date {
165
- @include font-styles("body-small");
166
- }
167
129
  }
168
130
  }
169
131
  }