@nice-digital/nds-alphabet 1.0.4-alpha.0 → 1.0.5-alpha.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.
- package/package.json +3 -3
- package/scss/alphabet.scss +17 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice-digital/nds-alphabet",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5-alpha.0",
|
|
4
4
|
"description": "Alphabet component for the NICE Design System",
|
|
5
5
|
"main": "lib/Alphabet.js",
|
|
6
6
|
"module": "es/Alphabet.js",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"homepage": "https://design-system.nice.org.uk/",
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@nice-digital/nds-core": "^2.0.
|
|
37
|
+
"@nice-digital/nds-core": "^2.0.5-alpha.0",
|
|
38
38
|
"prop-types": "^15.8.1"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "c560cb90c31f1c8d2e3085df9b32bc4e47a37929"
|
|
41
41
|
}
|
package/scss/alphabet.scss
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
@use '@nice-digital/nds-core/scss/typography';
|
|
4
4
|
@use '@nice-digital/nds-core/scss/utils';
|
|
5
5
|
|
|
6
|
+
// To meet Success Criterion 2.5.5: Target Size (Enhanced) of WCAG 2.2
|
|
7
|
+
$-minimum-anchor-size: 44px;
|
|
8
|
+
|
|
6
9
|
.alphabet {
|
|
7
10
|
list-style: none;
|
|
8
11
|
margin: utils.rem(0 0 spacing.$large);
|
|
@@ -14,10 +17,12 @@
|
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
@supports (display: grid) {
|
|
17
|
-
column-gap: utils.rem(
|
|
20
|
+
column-gap: utils.rem(
|
|
21
|
+
spacing.$small - 2
|
|
22
|
+
); // Hack to get 26 letters to fit across on 1 line on desktop
|
|
18
23
|
display: grid;
|
|
19
|
-
grid-template-columns: repeat(auto-fit, minmax(
|
|
20
|
-
row-gap: utils.rem(spacing.$small);
|
|
24
|
+
grid-template-columns: repeat(auto-fit, minmax($-minimum-anchor-size, 1fr));
|
|
25
|
+
row-gap: utils.rem(spacing.$small - 2);
|
|
21
26
|
|
|
22
27
|
&--chunky {
|
|
23
28
|
column-gap: utils.rem(spacing.$medium);
|
|
@@ -33,21 +38,23 @@
|
|
|
33
38
|
|
|
34
39
|
a,
|
|
35
40
|
span {
|
|
36
|
-
|
|
41
|
+
align-items: center;
|
|
42
|
+
aspect-ratio: 1 / 1;
|
|
43
|
+
display: flex;
|
|
44
|
+
justify-content: center;
|
|
37
45
|
line-height: 1;
|
|
38
46
|
padding: utils.rem(spacing.$small 0);
|
|
39
47
|
text-align: center;
|
|
40
|
-
width:
|
|
48
|
+
width: utils.rem($-minimum-anchor-size);
|
|
41
49
|
}
|
|
42
50
|
|
|
43
51
|
a {
|
|
44
52
|
background: colours.$alphabet-letter-background;
|
|
45
53
|
border: 1px solid colours.$border;
|
|
46
|
-
border-radius: utils.rem(spacing.$xx-small);
|
|
47
54
|
text-decoration: none;
|
|
48
55
|
|
|
49
56
|
&:hover {
|
|
50
|
-
text-decoration: underline;
|
|
57
|
+
text-decoration-line: underline;
|
|
51
58
|
}
|
|
52
59
|
}
|
|
53
60
|
|
|
@@ -57,11 +64,12 @@
|
|
|
57
64
|
|
|
58
65
|
&--chunky {
|
|
59
66
|
@include typography.font-size(h4);
|
|
67
|
+
margin: utils.rem(0 spacing.$medium spacing.$medium 0);
|
|
60
68
|
|
|
61
69
|
a,
|
|
62
70
|
span {
|
|
63
71
|
padding: utils.rem(spacing.$medium 0);
|
|
64
|
-
width:
|
|
72
|
+
width: utils.rem(spacing.$x-large);
|
|
65
73
|
}
|
|
66
74
|
}
|
|
67
75
|
|
|
@@ -71,6 +79,7 @@
|
|
|
71
79
|
|
|
72
80
|
a,
|
|
73
81
|
span {
|
|
82
|
+
padding: 0;
|
|
74
83
|
width: auto;
|
|
75
84
|
}
|
|
76
85
|
}
|