@utrecht/component-library-css 1.0.0-alpha.130 → 1.0.0-alpha.131
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/dist/bem.css +63 -0
- package/dist/html.css +126 -0
- package/dist/index.css +192 -2
- package/dist/root-theme.css +3 -2
- package/package.json +3 -3
package/dist/bem.css
CHANGED
|
@@ -1199,16 +1199,73 @@ ol.utrecht-breadcrumb__list {
|
|
|
1199
1199
|
* Copyright (c) 2021 The Knights Who Say NIH! B.V.
|
|
1200
1200
|
* Copyright (c) 2021 Gemeente Utrecht
|
|
1201
1201
|
*/
|
|
1202
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
1202
1203
|
/**
|
|
1203
1204
|
* @license EUPL-1.2
|
|
1204
1205
|
* Copyright (c) 2021 Gemeente Utrecht
|
|
1205
1206
|
* Copyright (c) 2021 Robbert Broersma
|
|
1206
1207
|
*/
|
|
1207
1208
|
/* stylelint-disable-next-line block-no-empty */
|
|
1209
|
+
/*
|
|
1210
|
+
|
|
1211
|
+
# CSS implementation
|
|
1212
|
+
|
|
1213
|
+
## `text-decoration-skip`
|
|
1214
|
+
|
|
1215
|
+
`text-decoration-skip` can be helpful to avoid making some texts unreadable.
|
|
1216
|
+
For example by obscuring Arabic diacritics.
|
|
1217
|
+
|
|
1218
|
+
However, the combination of a greater thickness and skipping this thick underline
|
|
1219
|
+
leads to a very unappealing rendering of the underline. To avoid this,
|
|
1220
|
+
`text-decoration-skip` is disabled for interactive states.
|
|
1221
|
+
|
|
1222
|
+
For design token configurations that have identical thickness for normal and interactive
|
|
1223
|
+
states, this will lead to the (undesirable) effect that the focus/hover effect is switching
|
|
1224
|
+
from an interrupted to an uninterrupted underline (for some texts).
|
|
1225
|
+
|
|
1226
|
+
Apart from making `skip-ink` configurable for normal/focus/hover, there is no good solution yet.
|
|
1227
|
+
|
|
1228
|
+
---
|
|
1229
|
+
|
|
1230
|
+
Disabling `text-decoration-skip` for interactive states obscures some texts, and we assume for now
|
|
1231
|
+
that moving the pointer away from a link or having focus elsewhere first is simple enough to
|
|
1232
|
+
not make this too inconvenient.
|
|
1233
|
+
|
|
1234
|
+
---
|
|
1235
|
+
|
|
1236
|
+
Some folks implement the underline of links using `border-bottom` or even using a finely crafted
|
|
1237
|
+
`linear-gradient()` with a solid color at the bottom and transparent behind the text. These approaches
|
|
1238
|
+
would unfortunately not be able to provide the improved readability of `text-decoration-skip`.
|
|
1239
|
+
|
|
1240
|
+
## `text-decoration-thickness`
|
|
1241
|
+
|
|
1242
|
+
Varying `text-decoration-thickness` can be used to distinguish interactive states.
|
|
1243
|
+
|
|
1244
|
+
---
|
|
1245
|
+
|
|
1246
|
+
`text-decoration-thickness` appears to have rendering differences between Chrome and Safari.
|
|
1247
|
+
In Safari the line becomes thicker with extra pixels added to the bottom, while in Chrome
|
|
1248
|
+
the underline offset also seems to increase along with the thickness, which effectively means
|
|
1249
|
+
the underline is closer to the next line than in Safari.
|
|
1250
|
+
|
|
1251
|
+
---
|
|
1252
|
+
|
|
1253
|
+
It might be nice to use font-relative units for `text-decoration-thickness`, and that is why we
|
|
1254
|
+
use the `max()` function to ensure the underline remains visible for every font size.
|
|
1255
|
+
|
|
1256
|
+
## `transition`
|
|
1257
|
+
|
|
1258
|
+
`text-decoration-thickness` could be a candidate for animating between interactive states,
|
|
1259
|
+
however browsers don't seem to have implemented great looking supixel tweening yet.
|
|
1260
|
+
|
|
1261
|
+
`text-decoration-skip` also makes the transition more challenging to implement.
|
|
1262
|
+
|
|
1263
|
+
*/
|
|
1208
1264
|
.utrecht-link {
|
|
1209
1265
|
color: var(--utrecht-link-color, blue);
|
|
1210
1266
|
text-decoration: var(--utrecht-link-text-decoration, underline);
|
|
1211
1267
|
text-decoration-skip-ink: all;
|
|
1268
|
+
text-decoration-thickness: max(var(--utrecht-link-text-decoration-thickness), 1px);
|
|
1212
1269
|
text-underline-offset: var(--utrecht-link-text-underline-offset);
|
|
1213
1270
|
}
|
|
1214
1271
|
|
|
@@ -1221,6 +1278,9 @@ ol.utrecht-breadcrumb__list {
|
|
|
1221
1278
|
.utrecht-link--hover {
|
|
1222
1279
|
color: var(--utrecht-link-hover-color, var(--utrecht-link-color));
|
|
1223
1280
|
text-decoration: var(--utrecht-link-hover-text-decoration, var(--utrecht-link-text-decoration, underline));
|
|
1281
|
+
text-decoration-skip: none;
|
|
1282
|
+
text-decoration-skip-ink: none;
|
|
1283
|
+
text-decoration-thickness: max(var(--utrecht-link-hover-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
|
|
1224
1284
|
}
|
|
1225
1285
|
|
|
1226
1286
|
.utrecht-link:active,
|
|
@@ -1231,6 +1291,9 @@ ol.utrecht-breadcrumb__list {
|
|
|
1231
1291
|
.utrecht-link--focus, .utrecht-link:focus {
|
|
1232
1292
|
color: var(--utrecht-link-focus-color, var(--utrecht-link-color));
|
|
1233
1293
|
text-decoration: var(--utrecht-link-focus-text-decoration, var(--utrecht-link-text-decoration, underline));
|
|
1294
|
+
text-decoration-skip: none;
|
|
1295
|
+
text-decoration-skip-ink: none;
|
|
1296
|
+
text-decoration-thickness: max(var(--utrecht-link-focus-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
|
|
1234
1297
|
}
|
|
1235
1298
|
|
|
1236
1299
|
.utrecht-link--focus-visible, .utrecht-link:focus {
|
package/dist/html.css
CHANGED
|
@@ -1006,16 +1006,73 @@
|
|
|
1006
1006
|
* Copyright (c) 2021 The Knights Who Say NIH! B.V.
|
|
1007
1007
|
* Copyright (c) 2021 Gemeente Utrecht
|
|
1008
1008
|
*/
|
|
1009
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
1009
1010
|
/**
|
|
1010
1011
|
* @license EUPL-1.2
|
|
1011
1012
|
* Copyright (c) 2021 Gemeente Utrecht
|
|
1012
1013
|
* Copyright (c) 2021 Robbert Broersma
|
|
1013
1014
|
*/
|
|
1014
1015
|
/* stylelint-disable-next-line block-no-empty */
|
|
1016
|
+
/*
|
|
1017
|
+
|
|
1018
|
+
# CSS implementation
|
|
1019
|
+
|
|
1020
|
+
## `text-decoration-skip`
|
|
1021
|
+
|
|
1022
|
+
`text-decoration-skip` can be helpful to avoid making some texts unreadable.
|
|
1023
|
+
For example by obscuring Arabic diacritics.
|
|
1024
|
+
|
|
1025
|
+
However, the combination of a greater thickness and skipping this thick underline
|
|
1026
|
+
leads to a very unappealing rendering of the underline. To avoid this,
|
|
1027
|
+
`text-decoration-skip` is disabled for interactive states.
|
|
1028
|
+
|
|
1029
|
+
For design token configurations that have identical thickness for normal and interactive
|
|
1030
|
+
states, this will lead to the (undesirable) effect that the focus/hover effect is switching
|
|
1031
|
+
from an interrupted to an uninterrupted underline (for some texts).
|
|
1032
|
+
|
|
1033
|
+
Apart from making `skip-ink` configurable for normal/focus/hover, there is no good solution yet.
|
|
1034
|
+
|
|
1035
|
+
---
|
|
1036
|
+
|
|
1037
|
+
Disabling `text-decoration-skip` for interactive states obscures some texts, and we assume for now
|
|
1038
|
+
that moving the pointer away from a link or having focus elsewhere first is simple enough to
|
|
1039
|
+
not make this too inconvenient.
|
|
1040
|
+
|
|
1041
|
+
---
|
|
1042
|
+
|
|
1043
|
+
Some folks implement the underline of links using `border-bottom` or even using a finely crafted
|
|
1044
|
+
`linear-gradient()` with a solid color at the bottom and transparent behind the text. These approaches
|
|
1045
|
+
would unfortunately not be able to provide the improved readability of `text-decoration-skip`.
|
|
1046
|
+
|
|
1047
|
+
## `text-decoration-thickness`
|
|
1048
|
+
|
|
1049
|
+
Varying `text-decoration-thickness` can be used to distinguish interactive states.
|
|
1050
|
+
|
|
1051
|
+
---
|
|
1052
|
+
|
|
1053
|
+
`text-decoration-thickness` appears to have rendering differences between Chrome and Safari.
|
|
1054
|
+
In Safari the line becomes thicker with extra pixels added to the bottom, while in Chrome
|
|
1055
|
+
the underline offset also seems to increase along with the thickness, which effectively means
|
|
1056
|
+
the underline is closer to the next line than in Safari.
|
|
1057
|
+
|
|
1058
|
+
---
|
|
1059
|
+
|
|
1060
|
+
It might be nice to use font-relative units for `text-decoration-thickness`, and that is why we
|
|
1061
|
+
use the `max()` function to ensure the underline remains visible for every font size.
|
|
1062
|
+
|
|
1063
|
+
## `transition`
|
|
1064
|
+
|
|
1065
|
+
`text-decoration-thickness` could be a candidate for animating between interactive states,
|
|
1066
|
+
however browsers don't seem to have implemented great looking supixel tweening yet.
|
|
1067
|
+
|
|
1068
|
+
`text-decoration-skip` also makes the transition more challenging to implement.
|
|
1069
|
+
|
|
1070
|
+
*/
|
|
1015
1071
|
.utrecht-link, .utrecht-html a:link {
|
|
1016
1072
|
color: var(--utrecht-link-color, blue);
|
|
1017
1073
|
text-decoration: var(--utrecht-link-text-decoration, underline);
|
|
1018
1074
|
text-decoration-skip-ink: all;
|
|
1075
|
+
text-decoration-thickness: max(var(--utrecht-link-text-decoration-thickness), 1px);
|
|
1019
1076
|
text-underline-offset: var(--utrecht-link-text-underline-offset);
|
|
1020
1077
|
}
|
|
1021
1078
|
|
|
@@ -1030,6 +1087,9 @@
|
|
|
1030
1087
|
.utrecht-html a:hover {
|
|
1031
1088
|
color: var(--utrecht-link-hover-color, var(--utrecht-link-color));
|
|
1032
1089
|
text-decoration: var(--utrecht-link-hover-text-decoration, var(--utrecht-link-text-decoration, underline));
|
|
1090
|
+
text-decoration-skip: none;
|
|
1091
|
+
text-decoration-skip-ink: none;
|
|
1092
|
+
text-decoration-thickness: max(var(--utrecht-link-hover-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
|
|
1033
1093
|
}
|
|
1034
1094
|
|
|
1035
1095
|
.utrecht-link:active,
|
|
@@ -1041,6 +1101,9 @@
|
|
|
1041
1101
|
.utrecht-link--focus, .utrecht-html a:focus, .utrecht-link:focus {
|
|
1042
1102
|
color: var(--utrecht-link-focus-color, var(--utrecht-link-color));
|
|
1043
1103
|
text-decoration: var(--utrecht-link-focus-text-decoration, var(--utrecht-link-text-decoration, underline));
|
|
1104
|
+
text-decoration-skip: none;
|
|
1105
|
+
text-decoration-skip-ink: none;
|
|
1106
|
+
text-decoration-thickness: max(var(--utrecht-link-focus-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
|
|
1044
1107
|
}
|
|
1045
1108
|
|
|
1046
1109
|
.utrecht-link--focus-visible, .utrecht-html a:focus, .utrecht-link:focus {
|
|
@@ -1641,16 +1704,73 @@
|
|
|
1641
1704
|
* Copyright (c) 2021 The Knights Who Say NIH! B.V.
|
|
1642
1705
|
* Copyright (c) 2021 Gemeente Utrecht
|
|
1643
1706
|
*/
|
|
1707
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
1644
1708
|
/**
|
|
1645
1709
|
* @license EUPL-1.2
|
|
1646
1710
|
* Copyright (c) 2021 Gemeente Utrecht
|
|
1647
1711
|
* Copyright (c) 2021 Robbert Broersma
|
|
1648
1712
|
*/
|
|
1649
1713
|
/* stylelint-disable-next-line block-no-empty */
|
|
1714
|
+
/*
|
|
1715
|
+
|
|
1716
|
+
# CSS implementation
|
|
1717
|
+
|
|
1718
|
+
## `text-decoration-skip`
|
|
1719
|
+
|
|
1720
|
+
`text-decoration-skip` can be helpful to avoid making some texts unreadable.
|
|
1721
|
+
For example by obscuring Arabic diacritics.
|
|
1722
|
+
|
|
1723
|
+
However, the combination of a greater thickness and skipping this thick underline
|
|
1724
|
+
leads to a very unappealing rendering of the underline. To avoid this,
|
|
1725
|
+
`text-decoration-skip` is disabled for interactive states.
|
|
1726
|
+
|
|
1727
|
+
For design token configurations that have identical thickness for normal and interactive
|
|
1728
|
+
states, this will lead to the (undesirable) effect that the focus/hover effect is switching
|
|
1729
|
+
from an interrupted to an uninterrupted underline (for some texts).
|
|
1730
|
+
|
|
1731
|
+
Apart from making `skip-ink` configurable for normal/focus/hover, there is no good solution yet.
|
|
1732
|
+
|
|
1733
|
+
---
|
|
1734
|
+
|
|
1735
|
+
Disabling `text-decoration-skip` for interactive states obscures some texts, and we assume for now
|
|
1736
|
+
that moving the pointer away from a link or having focus elsewhere first is simple enough to
|
|
1737
|
+
not make this too inconvenient.
|
|
1738
|
+
|
|
1739
|
+
---
|
|
1740
|
+
|
|
1741
|
+
Some folks implement the underline of links using `border-bottom` or even using a finely crafted
|
|
1742
|
+
`linear-gradient()` with a solid color at the bottom and transparent behind the text. These approaches
|
|
1743
|
+
would unfortunately not be able to provide the improved readability of `text-decoration-skip`.
|
|
1744
|
+
|
|
1745
|
+
## `text-decoration-thickness`
|
|
1746
|
+
|
|
1747
|
+
Varying `text-decoration-thickness` can be used to distinguish interactive states.
|
|
1748
|
+
|
|
1749
|
+
---
|
|
1750
|
+
|
|
1751
|
+
`text-decoration-thickness` appears to have rendering differences between Chrome and Safari.
|
|
1752
|
+
In Safari the line becomes thicker with extra pixels added to the bottom, while in Chrome
|
|
1753
|
+
the underline offset also seems to increase along with the thickness, which effectively means
|
|
1754
|
+
the underline is closer to the next line than in Safari.
|
|
1755
|
+
|
|
1756
|
+
---
|
|
1757
|
+
|
|
1758
|
+
It might be nice to use font-relative units for `text-decoration-thickness`, and that is why we
|
|
1759
|
+
use the `max()` function to ensure the underline remains visible for every font size.
|
|
1760
|
+
|
|
1761
|
+
## `transition`
|
|
1762
|
+
|
|
1763
|
+
`text-decoration-thickness` could be a candidate for animating between interactive states,
|
|
1764
|
+
however browsers don't seem to have implemented great looking supixel tweening yet.
|
|
1765
|
+
|
|
1766
|
+
`text-decoration-skip` also makes the transition more challenging to implement.
|
|
1767
|
+
|
|
1768
|
+
*/
|
|
1650
1769
|
.utrecht-link, .utrecht-html a:link {
|
|
1651
1770
|
color: var(--utrecht-link-color, blue);
|
|
1652
1771
|
text-decoration: var(--utrecht-link-text-decoration, underline);
|
|
1653
1772
|
text-decoration-skip-ink: all;
|
|
1773
|
+
text-decoration-thickness: max(var(--utrecht-link-text-decoration-thickness), 1px);
|
|
1654
1774
|
text-underline-offset: var(--utrecht-link-text-underline-offset);
|
|
1655
1775
|
}
|
|
1656
1776
|
|
|
@@ -1665,6 +1785,9 @@
|
|
|
1665
1785
|
.utrecht-html a:hover {
|
|
1666
1786
|
color: var(--utrecht-link-hover-color, var(--utrecht-link-color));
|
|
1667
1787
|
text-decoration: var(--utrecht-link-hover-text-decoration, var(--utrecht-link-text-decoration, underline));
|
|
1788
|
+
text-decoration-skip: none;
|
|
1789
|
+
text-decoration-skip-ink: none;
|
|
1790
|
+
text-decoration-thickness: max(var(--utrecht-link-hover-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
|
|
1668
1791
|
}
|
|
1669
1792
|
|
|
1670
1793
|
.utrecht-link:active,
|
|
@@ -1676,6 +1799,9 @@
|
|
|
1676
1799
|
.utrecht-link--focus, .utrecht-link:focus, .utrecht-html a:focus {
|
|
1677
1800
|
color: var(--utrecht-link-focus-color, var(--utrecht-link-color));
|
|
1678
1801
|
text-decoration: var(--utrecht-link-focus-text-decoration, var(--utrecht-link-text-decoration, underline));
|
|
1802
|
+
text-decoration-skip: none;
|
|
1803
|
+
text-decoration-skip-ink: none;
|
|
1804
|
+
text-decoration-thickness: max(var(--utrecht-link-focus-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
|
|
1679
1805
|
}
|
|
1680
1806
|
|
|
1681
1807
|
.utrecht-link--focus-visible, .utrecht-link:focus, .utrecht-html a:focus {
|
package/dist/index.css
CHANGED
|
@@ -1236,16 +1236,73 @@ ol.utrecht-breadcrumb__list {
|
|
|
1236
1236
|
* Copyright (c) 2021 The Knights Who Say NIH! B.V.
|
|
1237
1237
|
* Copyright (c) 2021 Gemeente Utrecht
|
|
1238
1238
|
*/
|
|
1239
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
1239
1240
|
/**
|
|
1240
1241
|
* @license EUPL-1.2
|
|
1241
1242
|
* Copyright (c) 2021 Gemeente Utrecht
|
|
1242
1243
|
* Copyright (c) 2021 Robbert Broersma
|
|
1243
1244
|
*/
|
|
1244
1245
|
/* stylelint-disable-next-line block-no-empty */
|
|
1246
|
+
/*
|
|
1247
|
+
|
|
1248
|
+
# CSS implementation
|
|
1249
|
+
|
|
1250
|
+
## `text-decoration-skip`
|
|
1251
|
+
|
|
1252
|
+
`text-decoration-skip` can be helpful to avoid making some texts unreadable.
|
|
1253
|
+
For example by obscuring Arabic diacritics.
|
|
1254
|
+
|
|
1255
|
+
However, the combination of a greater thickness and skipping this thick underline
|
|
1256
|
+
leads to a very unappealing rendering of the underline. To avoid this,
|
|
1257
|
+
`text-decoration-skip` is disabled for interactive states.
|
|
1258
|
+
|
|
1259
|
+
For design token configurations that have identical thickness for normal and interactive
|
|
1260
|
+
states, this will lead to the (undesirable) effect that the focus/hover effect is switching
|
|
1261
|
+
from an interrupted to an uninterrupted underline (for some texts).
|
|
1262
|
+
|
|
1263
|
+
Apart from making `skip-ink` configurable for normal/focus/hover, there is no good solution yet.
|
|
1264
|
+
|
|
1265
|
+
---
|
|
1266
|
+
|
|
1267
|
+
Disabling `text-decoration-skip` for interactive states obscures some texts, and we assume for now
|
|
1268
|
+
that moving the pointer away from a link or having focus elsewhere first is simple enough to
|
|
1269
|
+
not make this too inconvenient.
|
|
1270
|
+
|
|
1271
|
+
---
|
|
1272
|
+
|
|
1273
|
+
Some folks implement the underline of links using `border-bottom` or even using a finely crafted
|
|
1274
|
+
`linear-gradient()` with a solid color at the bottom and transparent behind the text. These approaches
|
|
1275
|
+
would unfortunately not be able to provide the improved readability of `text-decoration-skip`.
|
|
1276
|
+
|
|
1277
|
+
## `text-decoration-thickness`
|
|
1278
|
+
|
|
1279
|
+
Varying `text-decoration-thickness` can be used to distinguish interactive states.
|
|
1280
|
+
|
|
1281
|
+
---
|
|
1282
|
+
|
|
1283
|
+
`text-decoration-thickness` appears to have rendering differences between Chrome and Safari.
|
|
1284
|
+
In Safari the line becomes thicker with extra pixels added to the bottom, while in Chrome
|
|
1285
|
+
the underline offset also seems to increase along with the thickness, which effectively means
|
|
1286
|
+
the underline is closer to the next line than in Safari.
|
|
1287
|
+
|
|
1288
|
+
---
|
|
1289
|
+
|
|
1290
|
+
It might be nice to use font-relative units for `text-decoration-thickness`, and that is why we
|
|
1291
|
+
use the `max()` function to ensure the underline remains visible for every font size.
|
|
1292
|
+
|
|
1293
|
+
## `transition`
|
|
1294
|
+
|
|
1295
|
+
`text-decoration-thickness` could be a candidate for animating between interactive states,
|
|
1296
|
+
however browsers don't seem to have implemented great looking supixel tweening yet.
|
|
1297
|
+
|
|
1298
|
+
`text-decoration-skip` also makes the transition more challenging to implement.
|
|
1299
|
+
|
|
1300
|
+
*/
|
|
1245
1301
|
.utrecht-link, .utrecht-html a:link {
|
|
1246
1302
|
color: var(--utrecht-link-color, blue);
|
|
1247
1303
|
text-decoration: var(--utrecht-link-text-decoration, underline);
|
|
1248
1304
|
text-decoration-skip-ink: all;
|
|
1305
|
+
text-decoration-thickness: max(var(--utrecht-link-text-decoration-thickness), 1px);
|
|
1249
1306
|
text-underline-offset: var(--utrecht-link-text-underline-offset);
|
|
1250
1307
|
}
|
|
1251
1308
|
|
|
@@ -1260,6 +1317,9 @@ ol.utrecht-breadcrumb__list {
|
|
|
1260
1317
|
.utrecht-html a:hover {
|
|
1261
1318
|
color: var(--utrecht-link-hover-color, var(--utrecht-link-color));
|
|
1262
1319
|
text-decoration: var(--utrecht-link-hover-text-decoration, var(--utrecht-link-text-decoration, underline));
|
|
1320
|
+
text-decoration-skip: none;
|
|
1321
|
+
text-decoration-skip-ink: none;
|
|
1322
|
+
text-decoration-thickness: max(var(--utrecht-link-hover-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
|
|
1263
1323
|
}
|
|
1264
1324
|
|
|
1265
1325
|
.utrecht-link:active,
|
|
@@ -1271,6 +1331,9 @@ ol.utrecht-breadcrumb__list {
|
|
|
1271
1331
|
.utrecht-link--focus, .utrecht-html a:focus, .utrecht-link:focus {
|
|
1272
1332
|
color: var(--utrecht-link-focus-color, var(--utrecht-link-color));
|
|
1273
1333
|
text-decoration: var(--utrecht-link-focus-text-decoration, var(--utrecht-link-text-decoration, underline));
|
|
1334
|
+
text-decoration-skip: none;
|
|
1335
|
+
text-decoration-skip-ink: none;
|
|
1336
|
+
text-decoration-thickness: max(var(--utrecht-link-focus-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
|
|
1274
1337
|
}
|
|
1275
1338
|
|
|
1276
1339
|
.utrecht-link--focus-visible, .utrecht-html a:focus, .utrecht-link:focus {
|
|
@@ -3751,16 +3814,73 @@ ol.utrecht-breadcrumb__list {
|
|
|
3751
3814
|
* Copyright (c) 2021 The Knights Who Say NIH! B.V.
|
|
3752
3815
|
* Copyright (c) 2021 Gemeente Utrecht
|
|
3753
3816
|
*/
|
|
3817
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
3754
3818
|
/**
|
|
3755
3819
|
* @license EUPL-1.2
|
|
3756
3820
|
* Copyright (c) 2021 Gemeente Utrecht
|
|
3757
3821
|
* Copyright (c) 2021 Robbert Broersma
|
|
3758
3822
|
*/
|
|
3759
3823
|
/* stylelint-disable-next-line block-no-empty */
|
|
3824
|
+
/*
|
|
3825
|
+
|
|
3826
|
+
# CSS implementation
|
|
3827
|
+
|
|
3828
|
+
## `text-decoration-skip`
|
|
3829
|
+
|
|
3830
|
+
`text-decoration-skip` can be helpful to avoid making some texts unreadable.
|
|
3831
|
+
For example by obscuring Arabic diacritics.
|
|
3832
|
+
|
|
3833
|
+
However, the combination of a greater thickness and skipping this thick underline
|
|
3834
|
+
leads to a very unappealing rendering of the underline. To avoid this,
|
|
3835
|
+
`text-decoration-skip` is disabled for interactive states.
|
|
3836
|
+
|
|
3837
|
+
For design token configurations that have identical thickness for normal and interactive
|
|
3838
|
+
states, this will lead to the (undesirable) effect that the focus/hover effect is switching
|
|
3839
|
+
from an interrupted to an uninterrupted underline (for some texts).
|
|
3840
|
+
|
|
3841
|
+
Apart from making `skip-ink` configurable for normal/focus/hover, there is no good solution yet.
|
|
3842
|
+
|
|
3843
|
+
---
|
|
3844
|
+
|
|
3845
|
+
Disabling `text-decoration-skip` for interactive states obscures some texts, and we assume for now
|
|
3846
|
+
that moving the pointer away from a link or having focus elsewhere first is simple enough to
|
|
3847
|
+
not make this too inconvenient.
|
|
3848
|
+
|
|
3849
|
+
---
|
|
3850
|
+
|
|
3851
|
+
Some folks implement the underline of links using `border-bottom` or even using a finely crafted
|
|
3852
|
+
`linear-gradient()` with a solid color at the bottom and transparent behind the text. These approaches
|
|
3853
|
+
would unfortunately not be able to provide the improved readability of `text-decoration-skip`.
|
|
3854
|
+
|
|
3855
|
+
## `text-decoration-thickness`
|
|
3856
|
+
|
|
3857
|
+
Varying `text-decoration-thickness` can be used to distinguish interactive states.
|
|
3858
|
+
|
|
3859
|
+
---
|
|
3860
|
+
|
|
3861
|
+
`text-decoration-thickness` appears to have rendering differences between Chrome and Safari.
|
|
3862
|
+
In Safari the line becomes thicker with extra pixels added to the bottom, while in Chrome
|
|
3863
|
+
the underline offset also seems to increase along with the thickness, which effectively means
|
|
3864
|
+
the underline is closer to the next line than in Safari.
|
|
3865
|
+
|
|
3866
|
+
---
|
|
3867
|
+
|
|
3868
|
+
It might be nice to use font-relative units for `text-decoration-thickness`, and that is why we
|
|
3869
|
+
use the `max()` function to ensure the underline remains visible for every font size.
|
|
3870
|
+
|
|
3871
|
+
## `transition`
|
|
3872
|
+
|
|
3873
|
+
`text-decoration-thickness` could be a candidate for animating between interactive states,
|
|
3874
|
+
however browsers don't seem to have implemented great looking supixel tweening yet.
|
|
3875
|
+
|
|
3876
|
+
`text-decoration-skip` also makes the transition more challenging to implement.
|
|
3877
|
+
|
|
3878
|
+
*/
|
|
3760
3879
|
.utrecht-link, .utrecht-html a:link {
|
|
3761
3880
|
color: var(--utrecht-link-color, blue);
|
|
3762
3881
|
text-decoration: var(--utrecht-link-text-decoration, underline);
|
|
3763
3882
|
text-decoration-skip-ink: all;
|
|
3883
|
+
text-decoration-thickness: max(var(--utrecht-link-text-decoration-thickness), 1px);
|
|
3764
3884
|
text-underline-offset: var(--utrecht-link-text-underline-offset);
|
|
3765
3885
|
}
|
|
3766
3886
|
|
|
@@ -3775,6 +3895,9 @@ ol.utrecht-breadcrumb__list {
|
|
|
3775
3895
|
.utrecht-html a:hover {
|
|
3776
3896
|
color: var(--utrecht-link-hover-color, var(--utrecht-link-color));
|
|
3777
3897
|
text-decoration: var(--utrecht-link-hover-text-decoration, var(--utrecht-link-text-decoration, underline));
|
|
3898
|
+
text-decoration-skip: none;
|
|
3899
|
+
text-decoration-skip-ink: none;
|
|
3900
|
+
text-decoration-thickness: max(var(--utrecht-link-hover-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
|
|
3778
3901
|
}
|
|
3779
3902
|
|
|
3780
3903
|
.utrecht-link:active,
|
|
@@ -3786,6 +3909,9 @@ ol.utrecht-breadcrumb__list {
|
|
|
3786
3909
|
.utrecht-link--focus, .utrecht-html a:focus, .utrecht-link:focus {
|
|
3787
3910
|
color: var(--utrecht-link-focus-color, var(--utrecht-link-color));
|
|
3788
3911
|
text-decoration: var(--utrecht-link-focus-text-decoration, var(--utrecht-link-text-decoration, underline));
|
|
3912
|
+
text-decoration-skip: none;
|
|
3913
|
+
text-decoration-skip-ink: none;
|
|
3914
|
+
text-decoration-thickness: max(var(--utrecht-link-focus-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
|
|
3789
3915
|
}
|
|
3790
3916
|
|
|
3791
3917
|
.utrecht-link--focus-visible, .utrecht-html a:focus, .utrecht-link:focus {
|
|
@@ -4386,16 +4512,73 @@ ol.utrecht-breadcrumb__list {
|
|
|
4386
4512
|
* Copyright (c) 2021 The Knights Who Say NIH! B.V.
|
|
4387
4513
|
* Copyright (c) 2021 Gemeente Utrecht
|
|
4388
4514
|
*/
|
|
4515
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
4389
4516
|
/**
|
|
4390
4517
|
* @license EUPL-1.2
|
|
4391
4518
|
* Copyright (c) 2021 Gemeente Utrecht
|
|
4392
4519
|
* Copyright (c) 2021 Robbert Broersma
|
|
4393
4520
|
*/
|
|
4394
4521
|
/* stylelint-disable-next-line block-no-empty */
|
|
4522
|
+
/*
|
|
4523
|
+
|
|
4524
|
+
# CSS implementation
|
|
4525
|
+
|
|
4526
|
+
## `text-decoration-skip`
|
|
4527
|
+
|
|
4528
|
+
`text-decoration-skip` can be helpful to avoid making some texts unreadable.
|
|
4529
|
+
For example by obscuring Arabic diacritics.
|
|
4530
|
+
|
|
4531
|
+
However, the combination of a greater thickness and skipping this thick underline
|
|
4532
|
+
leads to a very unappealing rendering of the underline. To avoid this,
|
|
4533
|
+
`text-decoration-skip` is disabled for interactive states.
|
|
4534
|
+
|
|
4535
|
+
For design token configurations that have identical thickness for normal and interactive
|
|
4536
|
+
states, this will lead to the (undesirable) effect that the focus/hover effect is switching
|
|
4537
|
+
from an interrupted to an uninterrupted underline (for some texts).
|
|
4538
|
+
|
|
4539
|
+
Apart from making `skip-ink` configurable for normal/focus/hover, there is no good solution yet.
|
|
4540
|
+
|
|
4541
|
+
---
|
|
4542
|
+
|
|
4543
|
+
Disabling `text-decoration-skip` for interactive states obscures some texts, and we assume for now
|
|
4544
|
+
that moving the pointer away from a link or having focus elsewhere first is simple enough to
|
|
4545
|
+
not make this too inconvenient.
|
|
4546
|
+
|
|
4547
|
+
---
|
|
4548
|
+
|
|
4549
|
+
Some folks implement the underline of links using `border-bottom` or even using a finely crafted
|
|
4550
|
+
`linear-gradient()` with a solid color at the bottom and transparent behind the text. These approaches
|
|
4551
|
+
would unfortunately not be able to provide the improved readability of `text-decoration-skip`.
|
|
4552
|
+
|
|
4553
|
+
## `text-decoration-thickness`
|
|
4554
|
+
|
|
4555
|
+
Varying `text-decoration-thickness` can be used to distinguish interactive states.
|
|
4556
|
+
|
|
4557
|
+
---
|
|
4558
|
+
|
|
4559
|
+
`text-decoration-thickness` appears to have rendering differences between Chrome and Safari.
|
|
4560
|
+
In Safari the line becomes thicker with extra pixels added to the bottom, while in Chrome
|
|
4561
|
+
the underline offset also seems to increase along with the thickness, which effectively means
|
|
4562
|
+
the underline is closer to the next line than in Safari.
|
|
4563
|
+
|
|
4564
|
+
---
|
|
4565
|
+
|
|
4566
|
+
It might be nice to use font-relative units for `text-decoration-thickness`, and that is why we
|
|
4567
|
+
use the `max()` function to ensure the underline remains visible for every font size.
|
|
4568
|
+
|
|
4569
|
+
## `transition`
|
|
4570
|
+
|
|
4571
|
+
`text-decoration-thickness` could be a candidate for animating between interactive states,
|
|
4572
|
+
however browsers don't seem to have implemented great looking supixel tweening yet.
|
|
4573
|
+
|
|
4574
|
+
`text-decoration-skip` also makes the transition more challenging to implement.
|
|
4575
|
+
|
|
4576
|
+
*/
|
|
4395
4577
|
.utrecht-link, .utrecht-html a:link {
|
|
4396
4578
|
color: var(--utrecht-link-color, blue);
|
|
4397
4579
|
text-decoration: var(--utrecht-link-text-decoration, underline);
|
|
4398
4580
|
text-decoration-skip-ink: all;
|
|
4581
|
+
text-decoration-thickness: max(var(--utrecht-link-text-decoration-thickness), 1px);
|
|
4399
4582
|
text-underline-offset: var(--utrecht-link-text-underline-offset);
|
|
4400
4583
|
}
|
|
4401
4584
|
|
|
@@ -4410,6 +4593,9 @@ ol.utrecht-breadcrumb__list {
|
|
|
4410
4593
|
.utrecht-html a:hover {
|
|
4411
4594
|
color: var(--utrecht-link-hover-color, var(--utrecht-link-color));
|
|
4412
4595
|
text-decoration: var(--utrecht-link-hover-text-decoration, var(--utrecht-link-text-decoration, underline));
|
|
4596
|
+
text-decoration-skip: none;
|
|
4597
|
+
text-decoration-skip-ink: none;
|
|
4598
|
+
text-decoration-thickness: max(var(--utrecht-link-hover-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
|
|
4413
4599
|
}
|
|
4414
4600
|
|
|
4415
4601
|
.utrecht-link:active,
|
|
@@ -4421,6 +4607,9 @@ ol.utrecht-breadcrumb__list {
|
|
|
4421
4607
|
.utrecht-link--focus, .utrecht-link:focus, .utrecht-html a:focus {
|
|
4422
4608
|
color: var(--utrecht-link-focus-color, var(--utrecht-link-color));
|
|
4423
4609
|
text-decoration: var(--utrecht-link-focus-text-decoration, var(--utrecht-link-text-decoration, underline));
|
|
4610
|
+
text-decoration-skip: none;
|
|
4611
|
+
text-decoration-skip-ink: none;
|
|
4612
|
+
text-decoration-thickness: max(var(--utrecht-link-focus-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
|
|
4424
4613
|
}
|
|
4425
4614
|
|
|
4426
4615
|
.utrecht-link--focus-visible, .utrecht-link:focus, .utrecht-html a:focus {
|
|
@@ -5096,7 +5285,7 @@ ol.utrecht-breadcrumb__list {
|
|
|
5096
5285
|
/* Collection of CSS variables for Utrecht theme applied to `:root` */
|
|
5097
5286
|
/**
|
|
5098
5287
|
* Do not edit directly
|
|
5099
|
-
* Generated on Fri, 26 Nov 2021
|
|
5288
|
+
* Generated on Fri, 26 Nov 2021 09:18:08 GMT
|
|
5100
5289
|
*/
|
|
5101
5290
|
:root {
|
|
5102
5291
|
--utrecht-toptask-nav-link-grid-max-inline-size: 240px;
|
|
@@ -5212,7 +5401,7 @@ ol.utrecht-breadcrumb__list {
|
|
|
5212
5401
|
--utrecht-separator-block-size: 8px;
|
|
5213
5402
|
--utrecht-select-border-block-end-width: 3px;
|
|
5214
5403
|
--utrecht-pre-heading-text-transform: uppercase;
|
|
5215
|
-
--utrecht-paragraph-line-height: 1.
|
|
5404
|
+
--utrecht-paragraph-line-height: 1.5;
|
|
5216
5405
|
--utrecht-pagination-relative-link-distanced-margin-inline-start: 0.5em;
|
|
5217
5406
|
--utrecht-pagination-relative-link-distanced-margin-inline-end: 0.5em;
|
|
5218
5407
|
--utrecht-pagination-relative-link-text-transform: uppercase;
|
|
@@ -5263,6 +5452,7 @@ ol.utrecht-breadcrumb__list {
|
|
|
5263
5452
|
--utrecht-mapcontrolbutton-margin-inline-start: 0;
|
|
5264
5453
|
--utrecht-logo-max-width: 110.57px;
|
|
5265
5454
|
--utrecht-logo-max-height: 58.97px;
|
|
5455
|
+
--utrecht-link-hover-text-decoration-thickness: 3px;
|
|
5266
5456
|
--utrecht-link-hover-text-decoration: underline;
|
|
5267
5457
|
--utrecht-link-focus-text-decoration: none;
|
|
5268
5458
|
--utrecht-link-text-underline-offset: 3px;
|
package/dist/root-theme.css
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/* Collection of CSS variables for Utrecht theme applied to `:root` */
|
|
6
6
|
/**
|
|
7
7
|
* Do not edit directly
|
|
8
|
-
* Generated on Fri, 26 Nov 2021
|
|
8
|
+
* Generated on Fri, 26 Nov 2021 09:18:08 GMT
|
|
9
9
|
*/
|
|
10
10
|
:root {
|
|
11
11
|
--utrecht-toptask-nav-link-grid-max-inline-size: 240px;
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
--utrecht-separator-block-size: 8px;
|
|
122
122
|
--utrecht-select-border-block-end-width: 3px;
|
|
123
123
|
--utrecht-pre-heading-text-transform: uppercase;
|
|
124
|
-
--utrecht-paragraph-line-height: 1.
|
|
124
|
+
--utrecht-paragraph-line-height: 1.5;
|
|
125
125
|
--utrecht-pagination-relative-link-distanced-margin-inline-start: 0.5em;
|
|
126
126
|
--utrecht-pagination-relative-link-distanced-margin-inline-end: 0.5em;
|
|
127
127
|
--utrecht-pagination-relative-link-text-transform: uppercase;
|
|
@@ -172,6 +172,7 @@
|
|
|
172
172
|
--utrecht-mapcontrolbutton-margin-inline-start: 0;
|
|
173
173
|
--utrecht-logo-max-width: 110.57px;
|
|
174
174
|
--utrecht-logo-max-height: 58.97px;
|
|
175
|
+
--utrecht-link-hover-text-decoration-thickness: 3px;
|
|
175
176
|
--utrecht-link-hover-text-decoration: underline;
|
|
176
177
|
--utrecht-link-focus-text-decoration: none;
|
|
177
178
|
--utrecht-link-text-underline-offset: 3px;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.0-alpha.
|
|
2
|
+
"version": "1.0.0-alpha.131",
|
|
3
3
|
"author": "Community for NL Design System",
|
|
4
4
|
"description": "Component library bundle for the Municipality of Utrecht based on the NL Design System architecture",
|
|
5
5
|
"license": "EUPL-1.2",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"url": "git@github.com:nl-design-system/utrecht.git"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@utrecht/design-tokens": "1.0.0-alpha.
|
|
19
|
+
"@utrecht/design-tokens": "1.0.0-alpha.124",
|
|
20
20
|
"node-sass-package-importer": "5.3.2",
|
|
21
21
|
"rimraf": "3.0.2",
|
|
22
22
|
"sass": "1.43.4"
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"build": "sass src/:dist/ --load-path=../../node_modules/ --no-source-map",
|
|
27
27
|
"clean": "rimraf dist/"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "59c60bc6c89176bf94785682f27d355c56a93eb8"
|
|
30
30
|
}
|