@plus234feed/ds 0.5.0 → 0.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.
- package/package.json +1 -1
- package/src/components.css +30 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plus234feed/ds",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Plus234Feed design system. Editorial tokens, type scale and components for a news intelligence platform: newspaper hierarchy, accessible colour in both themes, one component per job.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-system",
|
package/src/components.css
CHANGED
|
@@ -315,8 +315,17 @@
|
|
|
315
315
|
max-width: var(--p234-measure-text);
|
|
316
316
|
}
|
|
317
317
|
.p234-prose > * + * { margin-top: var(--p234-space-5); }
|
|
318
|
-
|
|
319
|
-
|
|
318
|
+
/* Links in running text, but not links that are already a component.
|
|
319
|
+
*
|
|
320
|
+
* `.p234-prose a` is a class and a type, which outranks the single class on
|
|
321
|
+
* `.p234-btn`, so without this guard a button inside prose takes the link
|
|
322
|
+
* colour: brand green text on a brand green fill, which renders as an empty
|
|
323
|
+
* green rectangle. The same applied to a tag, a toggle and a directory row.
|
|
324
|
+
*
|
|
325
|
+
* Excluding anything that carries a p234- class keeps the component in charge
|
|
326
|
+
* of its own colour, which is the rule everywhere else in here. */
|
|
327
|
+
.p234-prose a:not([class*="p234-"]) { color: var(--p234-color-link); text-underline-offset: 2px; }
|
|
328
|
+
.p234-prose a:not([class*="p234-"]):visited { color: var(--p234-color-link-visited); }
|
|
320
329
|
.p234-prose blockquote {
|
|
321
330
|
font-family: var(--p234-type-quote-family);
|
|
322
331
|
font-size: var(--p234-type-quote-size);
|
|
@@ -461,7 +470,10 @@
|
|
|
461
470
|
font-weight: 700;
|
|
462
471
|
color: var(--p234-color-brand);
|
|
463
472
|
}
|
|
464
|
-
|
|
473
|
+
/* Same guard as prose: a link that is already a component keeps its own
|
|
474
|
+
colour. Without it a button or tag dropped into this box would be styled
|
|
475
|
+
as one of the box's own link rows. */
|
|
476
|
+
.p234-nextstep a:not([class*="p234-"]) {
|
|
465
477
|
font-family: var(--p234-type-headline-xs-family);
|
|
466
478
|
font-size: var(--p234-type-headline-xs-size);
|
|
467
479
|
line-height: var(--p234-type-headline-xs-leading);
|
|
@@ -469,7 +481,7 @@
|
|
|
469
481
|
color: var(--p234-color-ink);
|
|
470
482
|
text-decoration: none;
|
|
471
483
|
}
|
|
472
|
-
.p234-nextstep a:hover { text-decoration: underline; text-underline-offset: 2px; }
|
|
484
|
+
.p234-nextstep a:not([class*="p234-"]):hover { text-decoration: underline; text-underline-offset: 2px; }
|
|
473
485
|
|
|
474
486
|
/* --- breadcrumb --------------------------------------------------------
|
|
475
487
|
34 files hand-roll this today, each with its own separator and spacing. */
|
|
@@ -493,8 +505,8 @@
|
|
|
493
505
|
content: "/";
|
|
494
506
|
color: var(--p234-color-rule-strong);
|
|
495
507
|
}
|
|
496
|
-
.p234-breadcrumb a { color: var(--p234-color-ink-muted); text-decoration: none; }
|
|
497
|
-
.p234-breadcrumb a:hover { color: var(--p234-color-ink); text-decoration: underline; text-underline-offset: 2px; }
|
|
508
|
+
.p234-breadcrumb a:not([class*="p234-"]) { color: var(--p234-color-ink-muted); text-decoration: none; }
|
|
509
|
+
.p234-breadcrumb a:not([class*="p234-"]):hover { color: var(--p234-color-ink); text-decoration: underline; text-underline-offset: 2px; }
|
|
498
510
|
.p234-breadcrumb [aria-current="page"] { color: var(--p234-color-ink); }
|
|
499
511
|
|
|
500
512
|
/* --- figure ------------------------------------------------------------
|
|
@@ -711,7 +723,7 @@
|
|
|
711
723
|
justify-content: center;
|
|
712
724
|
gap: var(--p234-space-5);
|
|
713
725
|
}
|
|
714
|
-
.p234-masthead__editions a {
|
|
726
|
+
.p234-masthead__editions a:not([class*="p234-"]) {
|
|
715
727
|
font-family: var(--p234-type-ui-sm-family);
|
|
716
728
|
font-size: var(--p234-type-ui-sm-size);
|
|
717
729
|
font-weight: 600;
|
|
@@ -722,7 +734,7 @@
|
|
|
722
734
|
white-space: nowrap;
|
|
723
735
|
}
|
|
724
736
|
.p234-masthead__editions a:hover,
|
|
725
|
-
.p234-masthead__editions a[aria-current] { color: var(--p234-color-ink); }
|
|
737
|
+
.p234-masthead__editions a:not([class*="p234-"])[aria-current] { color: var(--p234-color-ink); }
|
|
726
738
|
|
|
727
739
|
/* Row 2: the wordmark, centred. */
|
|
728
740
|
.p234-masthead__bar {
|
|
@@ -840,13 +852,13 @@
|
|
|
840
852
|
}
|
|
841
853
|
.p234-megamenu ul { list-style: none; margin: 0; padding: 0; }
|
|
842
854
|
.p234-megamenu li { margin-bottom: var(--p234-space-4); }
|
|
843
|
-
.p234-megamenu a {
|
|
855
|
+
.p234-megamenu a:not([class*="p234-"]) {
|
|
844
856
|
font-family: var(--p234-type-ui-family);
|
|
845
857
|
font-size: var(--p234-type-ui-size);
|
|
846
858
|
color: var(--p234-color-ink);
|
|
847
859
|
text-decoration: none;
|
|
848
860
|
}
|
|
849
|
-
.p234-megamenu a:hover { text-decoration: underline; text-underline-offset: 2px; }
|
|
861
|
+
.p234-megamenu a:not([class*="p234-"]):hover { text-decoration: underline; text-underline-offset: 2px; }
|
|
850
862
|
|
|
851
863
|
/* The phone drawer: a full screen panel, search first, then the sections as
|
|
852
864
|
accordions. <details> so it works with no JavaScript. */
|
|
@@ -880,7 +892,7 @@
|
|
|
880
892
|
gap: var(--p234-space-4);
|
|
881
893
|
padding-bottom: var(--p234-space-5);
|
|
882
894
|
}
|
|
883
|
-
.p234-drawer__links a {
|
|
895
|
+
.p234-drawer__links a:not([class*="p234-"]) {
|
|
884
896
|
font-family: var(--p234-type-ui-family);
|
|
885
897
|
font-size: var(--p234-type-ui-size);
|
|
886
898
|
color: var(--p234-color-ink);
|
|
@@ -905,7 +917,7 @@
|
|
|
905
917
|
max-width: var(--p234-layout-container);
|
|
906
918
|
margin-inline: auto;
|
|
907
919
|
}
|
|
908
|
-
.p234-subnav a {
|
|
920
|
+
.p234-subnav a:not([class*="p234-"]) {
|
|
909
921
|
display: block;
|
|
910
922
|
font-family: var(--p234-type-ui-sm-family);
|
|
911
923
|
font-size: var(--p234-type-ui-sm-size);
|
|
@@ -917,8 +929,8 @@
|
|
|
917
929
|
border-bottom: var(--p234-border-thick) solid transparent;
|
|
918
930
|
margin-bottom: -1px;
|
|
919
931
|
}
|
|
920
|
-
.p234-subnav a:hover { color: var(--p234-color-ink); }
|
|
921
|
-
.p234-subnav a[aria-current] {
|
|
932
|
+
.p234-subnav a:not([class*="p234-"]):hover { color: var(--p234-color-ink); }
|
|
933
|
+
.p234-subnav a:not([class*="p234-"])[aria-current] {
|
|
922
934
|
color: var(--p234-color-ink);
|
|
923
935
|
border-bottom-color: var(--p234-color-brand);
|
|
924
936
|
}
|
|
@@ -984,13 +996,13 @@
|
|
|
984
996
|
}
|
|
985
997
|
.p234-footer ul { list-style: none; margin: 0; padding: 0; }
|
|
986
998
|
.p234-footer li { margin-bottom: var(--p234-space-3); }
|
|
987
|
-
.p234-footer a {
|
|
999
|
+
.p234-footer a:not([class*="p234-"]) {
|
|
988
1000
|
font-family: var(--p234-type-ui-sm-family);
|
|
989
1001
|
font-size: var(--p234-type-ui-sm-size);
|
|
990
1002
|
color: var(--p234-color-ink);
|
|
991
1003
|
text-decoration: none;
|
|
992
1004
|
}
|
|
993
|
-
.p234-footer a:hover { text-decoration: underline; text-underline-offset: 2px; }
|
|
1005
|
+
.p234-footer a:not([class*="p234-"]):hover { text-decoration: underline; text-underline-offset: 2px; }
|
|
994
1006
|
.p234-footer__legal {
|
|
995
1007
|
border-top: var(--p234-border-hairline) solid var(--p234-color-rule);
|
|
996
1008
|
padding-top: var(--p234-space-5);
|
|
@@ -1550,7 +1562,7 @@ textarea.p234-field__control {
|
|
|
1550
1562
|
margin: 0;
|
|
1551
1563
|
padding: 0;
|
|
1552
1564
|
}
|
|
1553
|
-
.p234-linkgrid a {
|
|
1565
|
+
.p234-linkgrid a:not([class*="p234-"]) {
|
|
1554
1566
|
display: block;
|
|
1555
1567
|
border-top: var(--p234-border-thick) solid var(--p234-color-ink);
|
|
1556
1568
|
padding-top: var(--p234-space-3);
|
|
@@ -1560,7 +1572,7 @@ textarea.p234-field__control {
|
|
|
1560
1572
|
color: var(--p234-color-ink);
|
|
1561
1573
|
text-decoration: none;
|
|
1562
1574
|
}
|
|
1563
|
-
.p234-linkgrid a:hover { color: var(--p234-color-brand); }
|
|
1575
|
+
.p234-linkgrid a:not([class*="p234-"]):hover { color: var(--p234-color-brand); }
|
|
1564
1576
|
.p234-linkgrid__count {
|
|
1565
1577
|
display: block;
|
|
1566
1578
|
font-family: var(--p234-type-meta-family);
|