@ilo-org/styles 1.8.1 → 1.8.2
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/css/components/link.css +1 -1
- package/css/components/richtext.css +1 -1
- package/css/components/table.css +1 -1
- package/css/global.css +1 -1
- package/css/global.css.map +1 -1
- package/css/index.css +2 -2
- package/css/index.css.map +1 -1
- package/css/monorepo.css +2 -2
- package/css/monorepo.css.map +1 -1
- package/package.json +3 -3
- package/scss/_mixins.scss +39 -88
- package/scss/components/_link.scss +7 -1
- package/scss/components/_richtext.scss +8 -10
- package/scss/theme/_foundation.scss +27 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ilo-org/styles",
|
|
3
3
|
"description": "Styles for products using ILO's Design System",
|
|
4
|
-
"version": "1.8.
|
|
4
|
+
"version": "1.8.2",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/international-labour-organization/designsystem.git",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@ilo-org/fonts": "1.0.0",
|
|
42
|
-
"@ilo-org/
|
|
43
|
-
"@ilo-org/
|
|
42
|
+
"@ilo-org/icons": "2.1.0",
|
|
43
|
+
"@ilo-org/themes": "0.9.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"cssnano": "^7.0.6",
|
package/scss/_mixins.scss
CHANGED
|
@@ -189,106 +189,57 @@
|
|
|
189
189
|
// Link styles
|
|
190
190
|
// ======================================
|
|
191
191
|
|
|
192
|
-
@mixin linkstyles() {
|
|
193
|
-
|
|
194
|
-
color:
|
|
192
|
+
@mixin linkstyles($theme: "light") {
|
|
193
|
+
$color-default: var(--ilo-link-color-default-light);
|
|
194
|
+
$color-visited: var(--ilo-link-color-visited-light);
|
|
195
|
+
$color-hover: var(--ilo-link-color-hover-light);
|
|
196
|
+
$color-active: var(--ilo-link-color-active-light);
|
|
197
|
+
$color-focus: var(--ilo-link-color-focus-light);
|
|
198
|
+
$background-default: var(--ilo-link-background-default-light);
|
|
199
|
+
$background-hover: var(--ilo-link-background-hover-light);
|
|
200
|
+
$background-focus: var(--ilo-link-background-focus-light);
|
|
201
|
+
|
|
202
|
+
@if ($theme == "dark") {
|
|
203
|
+
$color-default: var(--ilo-link-color-default-dark);
|
|
204
|
+
$color-visited: var(--ilo-link-color-visited-dark);
|
|
205
|
+
$color-hover: var(--ilo-link-color-hover-dark);
|
|
206
|
+
$background-default: var(--ilo-link-background-default-dark);
|
|
207
|
+
$background-hover: var(--ilo-link-background-hover-dark);
|
|
208
|
+
$background-focus: var(--ilo-link-background-focus-dark);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// Default styles
|
|
195
212
|
font-size: inherit;
|
|
196
213
|
font-weight: inherit;
|
|
197
214
|
line-height: inherit;
|
|
198
215
|
text-decoration: underline;
|
|
199
|
-
|
|
200
|
-
text-decoration-thickness: px-to-rem(
|
|
201
|
-
text-
|
|
202
|
-
padding-bottom: spacing(1);
|
|
216
|
+
background: transparent;
|
|
217
|
+
text-decoration-thickness: #{px-to-rem(1px)};
|
|
218
|
+
text-underline-offset: #{px-to-rem(6px)};
|
|
219
|
+
padding-bottom: #{spacing(1)};
|
|
220
|
+
|
|
221
|
+
color: $color-default;
|
|
222
|
+
text-decoration-color: $color-default;
|
|
203
223
|
|
|
204
224
|
&:visited {
|
|
205
|
-
|
|
206
|
-
color:
|
|
207
|
-
text-decoration-color: var(--ilo-color-purple);
|
|
225
|
+
color: $color-visited;
|
|
226
|
+
text-decoration-color: $color-visited;
|
|
208
227
|
}
|
|
209
228
|
|
|
210
229
|
&:hover {
|
|
211
|
-
|
|
212
|
-
color:
|
|
213
|
-
text-decoration-
|
|
214
|
-
text-decoration-
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
&:active {
|
|
218
|
-
background: map-get($color, "link", "background", "active");
|
|
219
|
-
color: map-get($color, "link", "text", "active");
|
|
220
|
-
text-decoration-thickness: 3px;
|
|
221
|
-
text-decoration-color: var(--ilo-color-blue-dark);
|
|
230
|
+
color: $color-hover;
|
|
231
|
+
background-color: $background-hover;
|
|
232
|
+
text-decoration-color: $color-hover;
|
|
233
|
+
text-decoration-thickness: #{px-to-rem(3px)};
|
|
222
234
|
}
|
|
223
235
|
|
|
236
|
+
&:active,
|
|
224
237
|
&:focus {
|
|
225
|
-
|
|
226
|
-
color:
|
|
227
|
-
text-decoration-thickness: 3px;
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
&--dark {
|
|
232
|
-
background: map-get($color, "link", "background-dark", "default");
|
|
233
|
-
color: map-get($color, "link", "text-dark", "default");
|
|
234
|
-
text-decoration-color: var(--ilo-color-gray-light);
|
|
235
|
-
|
|
236
|
-
&:visited {
|
|
237
|
-
background: map-get($color, "link", "background-dark", "visited");
|
|
238
|
-
color: map-get($color, "link", "text-dark", "visited");
|
|
239
|
-
text-decoration-color: var(--ilo-color-gray-base);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
&:hover {
|
|
243
|
-
background: map-get($color, "link", "background-dark", "hover");
|
|
244
|
-
color: map-get($color, "link", "text-dark", "hover");
|
|
245
|
-
text-decoration-thickness: 3px;
|
|
246
|
-
text-decoration-color: var(--ilo-color-blue);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
&:active {
|
|
250
|
-
background: map-get($color, "link", "background-dark", "active");
|
|
251
|
-
color: map-get($color, "link", "text-dark", "active");
|
|
252
|
-
text-decoration-thickness: 3px;
|
|
253
|
-
text-decoration-color: var(--ilo-color-blue-dark);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
&:focus {
|
|
257
|
-
background: map-get($color, "link", "background-dark", "focus");
|
|
258
|
-
color: map-get($color, "link", "text-dark", "focus");
|
|
259
|
-
text-decoration-thickness: 3px;
|
|
260
|
-
text-decoration-color: var(--ilo-color-blue-dark);
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
&--footer {
|
|
265
|
-
@include font-styles("body-xxs");
|
|
266
|
-
|
|
267
|
-
background: map-get($color, "link", "background-footer", "default");
|
|
268
|
-
color: map-get($color, "link", "text-footer", "default");
|
|
269
|
-
|
|
270
|
-
&:visited {
|
|
271
|
-
background: map-get($color, "link", "background-footer", "visited");
|
|
272
|
-
color: map-get($color, "link", "text-footer", "visited");
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
&:hover {
|
|
276
|
-
background: map-get($color, "link", "background-footer", "hover");
|
|
277
|
-
color: map-get($color, "link", "text-footer", "hover");
|
|
278
|
-
text-decoration-thickness: 3px;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
&:active {
|
|
282
|
-
background: map-get($color, "link", "background-footer", "active");
|
|
283
|
-
color: map-get($color, "link", "text-footer", "active");
|
|
284
|
-
text-decoration-thickness: 3px;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
&:focus {
|
|
288
|
-
background: map-get($color, "link", "background-footer", "focus");
|
|
289
|
-
color: map-get($color, "link", "text-footer", "focus");
|
|
290
|
-
text-decoration-thickness: 3px;
|
|
291
|
-
}
|
|
238
|
+
color: $color-focus;
|
|
239
|
+
text-decoration-color: $color-focus;
|
|
240
|
+
text-decoration-thickness: #{px-to-rem(3px)};
|
|
241
|
+
background-color: $background-focus;
|
|
242
|
+
outline: none;
|
|
292
243
|
}
|
|
293
244
|
}
|
|
294
245
|
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
--ilo-richtext-hr-color: var(--ilo-color-gray-light);
|
|
17
17
|
--ilo-richtext-link-color: var(--ilo-color-purple);
|
|
18
18
|
--ilo-richtext-link-visited-color: var(--ilo-color-purple);
|
|
19
|
+
|
|
20
|
+
a {
|
|
21
|
+
@include linkstyles("light");
|
|
22
|
+
}
|
|
19
23
|
}
|
|
20
24
|
|
|
21
25
|
&__theme__dark {
|
|
@@ -24,6 +28,10 @@
|
|
|
24
28
|
--ilo-richtext-hr-color: var(--ilo-color-gray-light);
|
|
25
29
|
--ilo-richtext-link-color: var(--ilo-color-blue-medium);
|
|
26
30
|
--ilo-richtext-link-visited-color: var(--ilo-color-blue-medium);
|
|
31
|
+
|
|
32
|
+
a {
|
|
33
|
+
@include linkstyles("dark");
|
|
34
|
+
}
|
|
27
35
|
}
|
|
28
36
|
|
|
29
37
|
color: var(--ilo-richtext-color);
|
|
@@ -101,16 +109,6 @@
|
|
|
101
109
|
font-weight: 700;
|
|
102
110
|
}
|
|
103
111
|
|
|
104
|
-
// Link styles
|
|
105
|
-
a {
|
|
106
|
-
@include linkstyles();
|
|
107
|
-
background: none;
|
|
108
|
-
|
|
109
|
-
&:hover {
|
|
110
|
-
background: none;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
112
|
// Image styles
|
|
115
113
|
img {
|
|
116
114
|
width: 100%;
|
|
@@ -63,7 +63,6 @@
|
|
|
63
63
|
/**
|
|
64
64
|
* Font-size
|
|
65
65
|
*/
|
|
66
|
-
|
|
67
66
|
--ilo-font-size-2xsm: calc(#{px-to-rem(10)} * var(--ilo-scale));
|
|
68
67
|
--ilo-font-size-xsm: calc(#{px-to-rem(12)} * var(--ilo-scale));
|
|
69
68
|
--ilo-font-size-sm: calc(#{px-to-rem(14)} * var(--ilo-scale));
|
|
@@ -119,4 +118,31 @@
|
|
|
119
118
|
--ilo-border-sm: calc(#{px-to-rem(1.5)} * var(--ilo-scale));
|
|
120
119
|
--ilo-border-md: calc(#{px-to-rem(2)} * var(--ilo-scale));
|
|
121
120
|
--ilo-border-lg: calc(#{px-to-rem(4)} * var(--ilo-scale));
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Links
|
|
124
|
+
*/
|
|
125
|
+
--ilo-link-color-default-light: var(--ilo-color-blue-dark);
|
|
126
|
+
--ilo-link-color-default-dark: var(--ilo-color-white);
|
|
127
|
+
|
|
128
|
+
--ilo-link-color-visited-light: var(--ilo-color-purple);
|
|
129
|
+
--ilo-link-color-visited-dark: var(--ilo-color-gray-base);
|
|
130
|
+
|
|
131
|
+
--ilo-link-color-hover-light: var(--ilo-color-blue);
|
|
132
|
+
--ilo-link-color-hover-dark: var(--ilo-color-blue);
|
|
133
|
+
|
|
134
|
+
--ilo-link-color-active-light: var(--ilo-color-blue-dark);
|
|
135
|
+
--ilo-link-color-active-dark: var(--ilo-color-blue-dark);
|
|
136
|
+
|
|
137
|
+
--ilo-link-color-focus-light: var(--ilo-color-blue-dark);
|
|
138
|
+
--ilo-link-color-focus-dark: var(--ilo-color-blue-dark);
|
|
139
|
+
|
|
140
|
+
--ilo-link-background-default-light: transparent;
|
|
141
|
+
--ilo-link-background-default-dark: transparent;
|
|
142
|
+
|
|
143
|
+
--ilo-link-background-hover-light: transparent;
|
|
144
|
+
--ilo-link-background-hover-dark: var(--ilo-color-white);
|
|
145
|
+
|
|
146
|
+
--ilo-link-background-focus-light: var(--ilo-color-yellow);
|
|
147
|
+
--ilo-link-background-focus-dark: var(--ilo-color-yellow);
|
|
122
148
|
}
|