@ilo-org/styles 1.3.3 → 1.4.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.
@@ -10,40 +10,30 @@
10
10
  &__feature {
11
11
  --max-width: #{px-to-rem(412px)};
12
12
 
13
- border-bottom: px-to-rem(3px) solid $brand-ilo-grey-ui;
13
+ border-bottom: px-to-rem(3px) solid var(--ilo-color-gray-base);
14
14
  display: flex;
15
15
  margin-top: 0;
16
16
  position: relative;
17
17
 
18
- &#{$self}__theme__dark {
19
- border-bottom: px-to-rem(3px) solid $color-base-red-medium;
20
-
18
+ &:hover,
19
+ &:focus,
20
+ &:focus-within {
21
21
  .ilo--link-list {
22
- border-top: 2px solid rgba($brand-ilo-grey-light, 0.25);
23
-
24
- &--link {
25
- color: $brand-ilo-white;
26
- @include dataurlicon("chevron_right", $brand-ilo-white);
22
+ &--label {
23
+ color: var(--ilo-color-blue) !important;
24
+ }
27
25
 
28
- [dir="rtl"] & {
29
- @include dataurlicon("chevron_left", $brand-ilo-white);
30
- }
26
+ &--icon {
27
+ background-color: var(--ilo-color-blue);
31
28
  }
32
29
  }
30
+ }
33
31
 
34
- &:hover,
35
- &:focus,
36
- &:focus-within {
37
- .ilo--link-list {
38
- &--link {
39
- color: $brand-ilo-blue;
40
- @include dataurlicon("chevron_right", $brand-ilo-blue);
41
-
42
- [dir="rtl"] & {
43
- @include dataurlicon("chevron_left", $brand-ilo-blue);
44
- }
45
- }
46
- }
32
+ &#{$self}__theme__dark {
33
+ border-bottom: px-to-rem(3px) solid var(--ilo-color-red);
34
+
35
+ .ilo--link-list {
36
+ border-top: 2px solid var(--ilo-color-gray-light-semi-transparent);
47
37
  }
48
38
  }
49
39
 
@@ -54,8 +44,8 @@
54
44
  &:hover,
55
45
  &:focus,
56
46
  &:focus-within {
57
- background-color: $brand-ilo-white;
58
- border-bottom: px-to-rem(3px) solid $brand-ilo-blue;
47
+ background-color: var(--ilo-color-white);
48
+ border-bottom: px-to-rem(3px) solid var(--ilo-color-blue);
59
49
  @include card-drop-shadow;
60
50
 
61
51
  picture::before {
@@ -70,7 +60,7 @@
70
60
  }
71
61
 
72
62
  .ilo--link-list {
73
- border-top: px-to-rem(2px) solid $brand-ilo-grey-light;
63
+ border-top: px-to-rem(2px) solid var(--ilo-color-gray-light);
74
64
  margin-left: px-to-rem(-24px);
75
65
  margin-right: px-to-rem(-24px);
76
66
  position: relative;
@@ -158,7 +148,7 @@
158
148
  position: relative;
159
149
 
160
150
  &::before {
161
- background-color: $brand-ilo-blue;
151
+ background-color: var(--ilo-color-blue);
162
152
  content: "";
163
153
  display: block;
164
154
  height: 100%;
@@ -0,0 +1,77 @@
1
+ @use "../tokens" as *;
2
+ @use "../functions" as *;
3
+ @import "../mixins";
4
+
5
+ .ilo--language-toggle {
6
+ --ilo--language-toggle-color: var(--ilo-color-white);
7
+ --ilo--language-toggle-color-hover: var(--ilo-color-blue);
8
+ --ilo--language-toggle-bg: transparent;
9
+ --ilo--language-toggle-bg-hover: transparent;
10
+
11
+ &--dark {
12
+ --ilo--language-toggle-color: var(--ilo-color-blue-dark);
13
+ --ilo--language-toggle-color-hover: var(--ilo-color-white);
14
+ }
15
+
16
+ &:hover,
17
+ &--open {
18
+ --ilo--language-toggle-color: var(--ilo--language-toggle-color-hover);
19
+ --ilo--language-toggle-bg: var(--ilo--language-toggle-bg-hover);
20
+ }
21
+
22
+ &--container {
23
+ all: unset;
24
+ display: flex;
25
+ align-items: center;
26
+ gap: px-to-rem(4px);
27
+ cursor: pointer;
28
+ width: fit-content;
29
+ background-color: var(--ilo--language-toggle-bg);
30
+
31
+ &:hover {
32
+ background-color: var(--ilo--language-toggle-bg-hover);
33
+ }
34
+ }
35
+
36
+ &--icon {
37
+ display: block;
38
+ width: px-to-rem(24px);
39
+ height: px-to-rem(24px);
40
+ @include icon("globe", var(--ilo--language-toggle-color));
41
+ }
42
+
43
+ &--arrow {
44
+ display: block;
45
+ width: px-to-rem(24px);
46
+ height: px-to-rem(24px);
47
+ @include icon("chevron_down", var(--ilo--language-toggle-color));
48
+ }
49
+
50
+ &--action {
51
+ color: var(--ilo--language-toggle-color);
52
+
53
+ //move this when the new typography is ready ##896
54
+ font-weight: 700;
55
+ font-size: px-to-rem(14px);
56
+ line-height: 135%;
57
+ letter-spacing: -2%;
58
+ }
59
+
60
+ &--context-menu {
61
+ position: absolute;
62
+ margin-top: spacing(2);
63
+ opacity: 0;
64
+ visibility: hidden;
65
+ transform: translateY(-10px);
66
+ transition:
67
+ opacity 0.3s ease,
68
+ visibility 0.3s ease,
69
+ transform 0.3s ease;
70
+
71
+ &__open {
72
+ opacity: 1;
73
+ visibility: visible;
74
+ transform: translateY(0);
75
+ }
76
+ }
77
+ }
@@ -3,16 +3,28 @@
3
3
  @import "../mixins";
4
4
 
5
5
  .ilo--list {
6
- @include invincible-list;
7
-
8
6
  &--title {
9
- @include font-styles("headline-6");
10
- margin-bottom: spacing(6);
11
- font-family: var(--ilo-fonts-display);
12
- font-weight: 700;
7
+ font-size: var(--ilo-font-size-xlg);
8
+ line-height: var(--ilo-line-height-md);
9
+ letter-spacing: var(--ilo-letter-spacing-xsm);
10
+ font-weight: var(--ilo-font-weight-bold);
11
+ margin-bottom: spacing(4);
12
+
13
+ @include breakpoint("lg") {
14
+ font-size: var(--ilo-font-size-3xlg);
15
+ margin-bottom: spacing(6);
16
+ }
17
+ }
18
+
19
+ &__theme {
20
+ &__light {
21
+ color: var(--ilo-color-gray-charcoal);
22
+ @include invincible-list;
23
+ }
13
24
 
14
- @include breakpoint("md") {
15
- @include font-styles("headline-5");
25
+ &__dark {
26
+ color: var(--ilo-color-white);
27
+ @include invincible-list(var(--ilo-color-white));
16
28
  }
17
29
  }
18
30
 
@@ -8,6 +8,8 @@
8
8
 
9
9
  &__type {
10
10
  &__multilink {
11
+ --standard-spacing: #{spacing(8)};
12
+ --narrow-spacing: #{spacing(6)};
11
13
  // Defaults to standard size
12
14
  --max-width: #{px-to-rem(536px)};
13
15
 
@@ -15,27 +17,35 @@
15
17
 
16
18
  #{$self}--image--wrapper {
17
19
  display: none;
20
+ background-color: var(--ilo-color-blue-lighter);
21
+ height: 0;
22
+ overflow: hidden;
23
+ padding-top: 56.25%;
24
+ position: relative;
25
+ margin-bottom: var(--standard-spacing);
26
+ position: relative;
27
+
28
+ picture,
29
+ img {
30
+ position: absolute;
31
+ top: 50%;
32
+ left: 50%;
33
+ transform: translate(-50%, -50%);
34
+ height: auto;
35
+ width: 100%;
36
+ }
18
37
  }
19
38
 
20
39
  #{$self}--content {
21
40
  #{$self}--image--wrapper {
22
41
  display: block;
23
- margin-bottom: spacing(8);
24
42
  }
25
43
  }
26
44
 
27
- @include breakpoint("md") {
28
- padding: spacing(10);
29
- }
30
-
31
- @include breakpoint("lg") {
32
- padding: spacing(14) spacing(12);
33
- }
34
-
35
45
  #{$self}--title {
36
46
  @include font-styles("headline-5");
37
- margin-bottom: spacing(8);
38
- color: $brand-ilo-black;
47
+ margin-bottom: var(--standard-spacing);
48
+ color: var(--ilo-color-gray-charcoal);
39
49
 
40
50
  @include breakpoint("md") {
41
51
  @include font-styles("headline-4");
@@ -44,8 +54,8 @@
44
54
 
45
55
  #{$self}--intro {
46
56
  @include font-styles("body-small");
47
- margin-bottom: spacing(8);
48
- color: $brand-ilo-black;
57
+ margin-bottom: var(--standard-spacing);
58
+ color: var(--ilo-color-gray-charcoal);
49
59
 
50
60
  @include breakpoint("md") {
51
61
  @include font-styles("base");
@@ -55,7 +65,6 @@
55
65
  &#{$self}__size {
56
66
  &__standard {
57
67
  --max-width: #{px-to-rem(536px)};
58
-
59
68
  padding: spacing(12) spacing(10);
60
69
  }
61
70
 
@@ -70,21 +79,21 @@
70
79
  #{$self}--content {
71
80
  #{$self}--image--wrapper {
72
81
  display: block;
73
- margin-bottom: spacing(6);
82
+ margin-bottom: var(--narrow-spacing);
74
83
  }
75
84
  }
76
85
 
77
86
  #{$self}--title {
78
87
  @include breakpoint("md") {
79
88
  @include font-styles("headline-5");
80
- margin-bottom: spacing(6);
89
+ margin-bottom: var(--narrow-spacing);
81
90
  }
82
91
  }
83
92
 
84
93
  #{$self}--intro {
85
94
  @include breakpoint("md") {
86
95
  @include font-styles("body-small");
87
- margin-bottom: spacing(6);
96
+ margin-bottom: var(--narrow-spacing);
88
97
  }
89
98
  }
90
99
  }
@@ -104,23 +113,26 @@
104
113
 
105
114
  &#{$self}__align__right {
106
115
  #{$self}--wrap {
107
- flex-direction: row-reverse;
116
+ grid-template-areas: "content image";
108
117
  }
109
118
  }
110
119
 
111
120
  #{$self}--wrap {
112
- display: flex;
113
- column-gap: px-to-rem(32px);
121
+ display: grid;
122
+ grid-template-areas: "image content";
123
+ grid-template-columns: 1fr 1fr;
124
+ gap: px-to-rem(32px);
114
125
  }
115
126
 
116
127
  #{$self}--image--wrapper {
117
- display: block;
118
- width: 50%;
128
+ grid-area: image;
129
+ display: inline-block;
130
+ margin-bottom: 0;
131
+ width: 100%;
119
132
  }
120
133
 
121
134
  #{$self}--content {
122
- width: 50%;
123
-
135
+ grid-area: content;
124
136
  #{$self}--image--wrapper {
125
137
  display: none;
126
138
  }
@@ -141,6 +153,25 @@
141
153
  position: relative;
142
154
  z-index: 3;
143
155
  }
156
+
157
+ @include breakpoint("md") {
158
+ padding: spacing(10);
159
+ }
160
+
161
+ @include breakpoint("lg") {
162
+ padding: spacing(14) spacing(12);
163
+ }
164
+ }
165
+ }
166
+
167
+ // Make list links white on hover when blue theme is set
168
+ &__theme__soft#{&}__type__multilink {
169
+ .ilo--link-list {
170
+ a {
171
+ &:hover {
172
+ background-color: var(--ilo-color-white);
173
+ }
174
+ }
144
175
  }
145
176
  }
146
177
  }
@@ -132,7 +132,9 @@
132
132
  }
133
133
 
134
134
  // Blockquote styles
135
- @include blockquote;
135
+ blockquote {
136
+ @include blockquote;
137
+ }
136
138
 
137
139
  // List styles (invincible list)
138
140
  @include invincible-list;
@@ -153,6 +153,30 @@
153
153
  @include get-icon("social_tiktok", "dark");
154
154
  }
155
155
  }
156
+
157
+ &__bluesky {
158
+ @include get-icon("social_bluesky");
159
+
160
+ #{$c}__theme__dark & {
161
+ @include get-icon("social_bluesky", "dark");
162
+ }
163
+ }
164
+
165
+ &__weibo {
166
+ @include get-icon("social_weibo");
167
+
168
+ #{$c}__theme__dark & {
169
+ @include get-icon("social_weibo", "dark");
170
+ }
171
+ }
172
+
173
+ &__wechat {
174
+ @include get-icon("social_wechat");
175
+
176
+ #{$c}__theme__dark & {
177
+ @include get-icon("social_wechat", "dark");
178
+ }
179
+ }
156
180
  }
157
181
  }
158
182
  }
@@ -1,4 +1,5 @@
1
1
  @use "accordion";
2
+ @use "blockquote";
2
3
  @use "breadcrumb";
3
4
  @use "button";
4
5
  @use "callout";
@@ -54,3 +55,4 @@
54
55
  @use "tooltip";
55
56
  @use "video";
56
57
  @use "socialmedia";
58
+ @use "languagetoggle";
@@ -40,6 +40,7 @@
40
40
  --ilo-color-gray-charcoal: rgba(45, 45, 45, 1);
41
41
  --ilo-color-gray-accessible: rgba(109, 109, 109, 1);
42
42
  --ilo-color-gray-light: rgba(237, 240, 242, 1);
43
+ --ilo-color-gray-light-semi-transparent: rgba(237, 240, 242, 0.25);
43
44
  --ilo-color-gray-base: rgba(184, 196, 204, 1);
44
45
  --ilo-color-red: rgba(250, 60, 75, 1);
45
46
  --ilo-color-red-light: rgba(254, 216, 219, 1);