datocms-react-ui 3.1.0-next.4 → 3.1.0-next.5

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/styles.css CHANGED
@@ -580,12 +580,11 @@ input {
580
580
  height: auto;
581
581
  }
582
582
  }
583
+ /* We do not set box-sizing here. A search input keeps the border-box of
584
+ the other text inputs (_base.css), thus it fits its container. */
583
585
  &[type="search"] {
584
- box-sizing: content-box;
585
586
  -webkit-appearance: textfield;
586
587
 
587
- /* 2*/
588
-
589
588
  &::-webkit-search-cancel-button,
590
589
  &::-webkit-search-decoration {
591
590
  -moz-appearance: none;
@@ -609,8 +608,7 @@ input {
609
608
  * decrement button to change from `default` to `text`.*/
610
609
 
611
610
  /**
612
- * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
613
- * 2. Address `box-sizing` set to `border-box` in Safari and Chrome.*/
611
+ * Address `appearance` set to `searchfield` in Safari and Chrome.*/
614
612
 
615
613
  /**
616
614
  * Remove inner padding and search cancel button in Safari and Chrome on OS X.
@@ -665,7 +663,6 @@ th {
665
663
  }
666
664
  html,
667
665
  body {
668
- height: 100%;
669
666
  background-color: var(--color--surface);
670
667
  }
671
668
  /* On a phone, all the interface is a step smaller. The sizes and the spaces
@@ -683,10 +680,13 @@ body {
683
680
  font-synthesis-weight: none;
684
681
  font-size: var(--font-size-m);
685
682
  -webkit-text-size-adjust: 100%;
686
- height: 100%;
687
683
  line-height: 1.4;
688
684
  color: var(--color--ink);
689
685
  text-rendering: optimizeLegibility;
686
+ /* A long word (a URL, an id) breaks only when it does not fit in its
687
+ line. "anywhere" would also change the min-content width, and the
688
+ grid and flex layouts would change. */
689
+ overflow-wrap: break-word;
690
690
  }
691
691
  /* Selected text has the colors of a selected row, thus it follows the brand
692
692
  hue and the color scheme */
@@ -986,8 +986,12 @@ input:-webkit-autofill {
986
986
  color: inherit !important;
987
987
  background-color: transparent !important;
988
988
  }
989
- svg {
990
- fill: var(--color--ink);
989
+ /* An icon takes the color of its text: set "color" on an icon, not "fill".
990
+ The value goes down as the keyword, thus each icon reads its own color.
991
+ It is not a rule on svg: that rule would win over the fill attribute of
992
+ an icon, and an outline icon (fill="none") would become a solid shape. */
993
+ html {
994
+ fill: currentColor;
991
995
  }
992
996
  button {
993
997
  box-sizing: border-box;
@@ -1151,7 +1155,6 @@ button {
1151
1155
  svg {
1152
1156
  width: 32px;
1153
1157
  height: 32px;
1154
- fill: currentColor;
1155
1158
  }
1156
1159
  }
1157
1160
  /* Spinner--centered is "position: absolute" at 50%. This box holds the
@@ -1186,11 +1189,14 @@ button {
1186
1189
  gap: var(--spacing-m);
1187
1190
  align-items: flex-start;
1188
1191
  }
1192
+ /* The slate centers its parts and makes them as wide as their content, thus
1193
+ a long button gets an ellipsis only with "max-width" */
1189
1194
  .blank-slate__actions {
1190
1195
  display: flex;
1191
1196
  flex-wrap: wrap;
1192
1197
  gap: var(--spacing-s);
1193
1198
  align-items: center;
1199
+ max-width: 100%;
1194
1200
  margin-top: var(--spacing-s);
1195
1201
  }
1196
1202
  /* The content can have a form, thus it uses all the width */
@@ -1249,7 +1255,14 @@ button {
1249
1255
  --chevron-color: currentColor;
1250
1256
 
1251
1257
  box-sizing: border-box;
1252
- display: inline-block;
1258
+ /* A button is never wider than its container: the label gets the
1259
+ ellipsis, and the icons and the chevron keep their size. A button
1260
+ element is as wide as its content, also as a block, thus it needs
1261
+ "max-width". */
1262
+ display: inline-flex;
1263
+ align-items: center;
1264
+ justify-content: center;
1265
+ max-width: 100%;
1253
1266
  padding: var(--button-pad-y) var(--button-pad-x);
1254
1267
  font-family: inherit;
1255
1268
  font-size: 1.1em;
@@ -1280,14 +1293,17 @@ button {
1280
1293
  > span {
1281
1294
  position: relative;
1282
1295
  top: 0.06em;
1296
+ min-width: 0;
1297
+ overflow: hidden;
1298
+ text-overflow: ellipsis;
1283
1299
  }
1284
1300
  svg,
1285
1301
  i,
1286
1302
  .Spinner {
1287
1303
  display: inline-block;
1304
+ flex: none;
1288
1305
  line-height: 0.6;
1289
1306
  vertical-align: middle;
1290
- fill: var(--color--primary-soft--ink);
1291
1307
 
1292
1308
  &:first-child {
1293
1309
  margin-right: 0.5em;
@@ -1300,9 +1316,14 @@ button {
1300
1316
  margin-left: 0;
1301
1317
  }
1302
1318
  }
1319
+ /* Only the svg takes the color. The bars of a .Spinner paint with
1320
+ currentColor, thus they keep the color of the text of the button. */
1321
+ svg {
1322
+ color: var(--color--primary-soft--ink);
1323
+ }
1303
1324
  > .Pill:last-child {
1325
+ flex: none;
1304
1326
  margin-left: 0.5em;
1305
- vertical-align: middle;
1306
1327
  }
1307
1328
  }
1308
1329
  .button--micro,
@@ -1355,14 +1376,9 @@ button {
1355
1376
  .button--large {
1356
1377
  font-size: 1.2em;
1357
1378
  }
1358
- .button--ellipsis {
1359
- overflow: hidden;
1360
- text-overflow: ellipsis;
1361
- }
1362
1379
  .button--expand {
1363
- display: block;
1380
+ display: flex;
1364
1381
  width: 100%;
1365
- text-align: center;
1366
1382
  }
1367
1383
  .button--expand-on-mobile {
1368
1384
  width: 100%;
@@ -1371,6 +1387,28 @@ button {
1371
1387
  width: auto;
1372
1388
  }
1373
1389
  }
1390
+ /* A soft toggle that is on has the recipe of a selected row: the solid
1391
+ recipe would make it look like the primary action. The rule comes after
1392
+ the states of the soft tone, thus a focused toggle keeps it: the focus
1393
+ stays on the button after the click. The border is an inset shadow, thus
1394
+ the size of the button does not change. */
1395
+ .button--soft[aria-pressed="true"] {
1396
+ --button-pressed-border: inset 0 0 0 1px var(--color--selected--border);
1397
+
1398
+ color: var(--color--selected--ink);
1399
+ background-color: var(--color--selected--surface);
1400
+ box-shadow: var(--button-pressed-border);
1401
+
1402
+ svg {
1403
+ color: var(--color--selected--ink);
1404
+ }
1405
+ &:is(:not(:where(:disabled, .is-disabled, [aria-disabled='true']))):hover {
1406
+ background-color: var(--color--selected--surface-hover);
1407
+ }
1408
+ &:focus-visible {
1409
+ box-shadow: var(--button-pressed-border), var(--focus-ring);
1410
+ }
1411
+ }
1374
1412
  .button--primary {
1375
1413
  color: var(--color--primary--ink);
1376
1414
  background-color: var(--color--primary--surface);
@@ -1392,18 +1430,18 @@ button {
1392
1430
  }
1393
1431
 
1394
1432
  svg {
1395
- fill: var(--color--primary--ink);
1433
+ color: var(--color--primary--ink);
1396
1434
  }
1397
1435
  }
1398
1436
  .button--accent-color {
1399
1437
  svg {
1400
- fill: var(--color--ink);
1438
+ color: var(--color--ink);
1401
1439
  }
1402
1440
  &:is(:not(:where(:disabled, .is-disabled, [aria-disabled='true']))):hover {
1403
1441
  color: var(--color--ink-link);
1404
1442
 
1405
1443
  svg {
1406
- fill: var(--color--ink-link);
1444
+ color: var(--color--ink-link);
1407
1445
  }
1408
1446
  }
1409
1447
  }
@@ -1412,7 +1450,7 @@ button {
1412
1450
  background: var(--color--overlay--surface);
1413
1451
 
1414
1452
  svg {
1415
- fill: var(--color--overlay--ink);
1453
+ color: var(--color--overlay--ink);
1416
1454
  }
1417
1455
  &:is(:not(:where(:disabled, .is-disabled, [aria-disabled='true']))):hover {
1418
1456
  background: var(--color--overlay--surface-hover);
@@ -1428,7 +1466,7 @@ button {
1428
1466
  border-width: 0;
1429
1467
 
1430
1468
  svg {
1431
- fill: var(--color--primary-inverse--ink);
1469
+ color: var(--color--primary-inverse--ink);
1432
1470
  }
1433
1471
  &:is(:not(:where(:disabled, .is-disabled, [aria-disabled='true']))):hover,
1434
1472
  &:is(:not(:where(:disabled, .is-disabled, [aria-disabled='true']))):focus {
@@ -1444,7 +1482,7 @@ button {
1444
1482
  border-width: 0;
1445
1483
 
1446
1484
  svg {
1447
- fill: var(--color--danger--ink);
1485
+ color: var(--color--danger--ink);
1448
1486
  }
1449
1487
  &:is(:not(:where(:disabled, .is-disabled, [aria-disabled='true']))):hover,
1450
1488
  &:is(:not(:where(:disabled, .is-disabled, [aria-disabled='true']))):focus,
@@ -1453,7 +1491,7 @@ button {
1453
1491
  background-color: var(--color--danger--surface);
1454
1492
 
1455
1493
  svg {
1456
- fill: var(--color--danger--ink);
1494
+ color: var(--color--danger--ink);
1457
1495
  }
1458
1496
  }
1459
1497
  }
@@ -1465,7 +1503,7 @@ button {
1465
1503
  color: var(--color--ink);
1466
1504
 
1467
1505
  svg {
1468
- fill: var(--color--ink);
1506
+ color: var(--color--ink);
1469
1507
  }
1470
1508
  }
1471
1509
  }
@@ -1473,7 +1511,7 @@ button {
1473
1511
  color: var(--color--ink-subtle);
1474
1512
 
1475
1513
  svg {
1476
- fill: var(--color--ink-subtle);
1514
+ color: var(--color--ink-subtle);
1477
1515
  }
1478
1516
  &:is(:not(:where(:disabled, .is-disabled, [aria-disabled='true']))):hover,
1479
1517
  &:is(:not(:where(:disabled, .is-disabled, [aria-disabled='true']))):focus,
@@ -1489,7 +1527,8 @@ button {
1489
1527
  Do not write the states again in the block:
1490
1528
  --button-ghost-ink the text and the icon at rest
1491
1529
  --button-ghost-hover-ink the text and the icon on hover and focus
1492
- --button-ghost-hover-surface the surface on hover and focus
1530
+ --button-ghost-hover-surface the surface on hover and focus, and while
1531
+ the button is pressed or its menu is open
1493
1532
  --button-ghost-active-surface the surface while the pointer is down
1494
1533
  --button-ghost-pressed-ink the text and the icon while the button is
1495
1534
  pressed or its menu is open */
@@ -1503,7 +1542,7 @@ button {
1503
1542
  transition: background-color 0.2s var(--material-ease);
1504
1543
 
1505
1544
  svg {
1506
- fill: var(--button-ghost-ink, var(--color--ink-subtle));
1545
+ color: var(--button-ghost-ink, var(--color--ink-subtle));
1507
1546
  }
1508
1547
  &:is(:not(:where(:disabled, .is-disabled, [aria-disabled='true']))):focus {
1509
1548
  background-color: transparent;
@@ -1518,7 +1557,7 @@ button {
1518
1557
  );
1519
1558
 
1520
1559
  svg {
1521
- fill: var(--button-ghost-hover-ink, var(--color--ink));
1560
+ color: var(--button-ghost-hover-ink, var(--color--ink));
1522
1561
  }
1523
1562
  }
1524
1563
  &:is(:not(:where(:disabled, .is-disabled, [aria-disabled='true']))):active {
@@ -1527,12 +1566,18 @@ button {
1527
1566
  var(--button-ghost-hover-surface, var(--color--surface-hover))
1528
1567
  );
1529
1568
  }
1569
+ /* The hover surface stays while the button is on. The ink alone does not
1570
+ show the state in the dark scheme: the link ink is near the subtle ink. */
1530
1571
  &[aria-pressed="true"],
1531
1572
  &[aria-expanded="true"] {
1532
1573
  color: var(--button-ghost-pressed-ink, var(--color--ink-link));
1574
+ background-color: var(
1575
+ --button-ghost-hover-surface,
1576
+ var(--color--surface-hover)
1577
+ );
1533
1578
 
1534
1579
  svg {
1535
- fill: var(--button-ghost-pressed-ink, var(--color--ink-link));
1580
+ color: var(--button-ghost-pressed-ink, var(--color--ink-link));
1536
1581
  }
1537
1582
  }
1538
1583
  }
@@ -1579,6 +1624,7 @@ button {
1579
1624
  the surface behind the buttons shows through it, thus it is correct for
1580
1625
  each type of button. */
1581
1626
  gap: 1px;
1627
+ max-width: 100%;
1582
1628
 
1583
1629
  /* The caret is in the root element of its Dropdown */
1584
1630
  & > * {
@@ -1597,6 +1643,11 @@ button {
1597
1643
  .button--sub {
1598
1644
  border-radius: 0;
1599
1645
  }
1646
+ /* A long label of the main half gets the ellipsis, thus the caret stays in
1647
+ the container. */
1648
+ .button--container > .button--sub {
1649
+ min-width: 0;
1650
+ }
1600
1651
  /* A disabled button keeps the colors of its variant and fades, thus a
1601
1652
  disabled primary button still reads as the primary action. The rules of
1602
1653
  the variants show the hover only on an enabled button (see ":--enabled"),
@@ -1640,7 +1691,7 @@ button {
1640
1691
  two classes. Thus they have more priority than a rule of a container that
1641
1692
  sets the size or the color of all its icons.
1642
1693
 
1643
- Do not set the fill of a chevron out of this file: set --chevron-color.
1694
+ Do not set the color of a chevron out of this file: set --chevron-color.
1644
1695
  A colored surface (a button, a pill, the navigation bar) sets it to
1645
1696
  currentColor: the chevron then has the color of the text in all the
1646
1697
  states. A control that is not a button or a link sets it to
@@ -1652,9 +1703,9 @@ button {
1652
1703
  width: max(10px, 0.75em);
1653
1704
  height: max(10px, 0.75em);
1654
1705
  vertical-align: middle;
1655
- fill: var(--chevron-color, var(--color--ink-subtle));
1706
+ color: var(--chevron-color, var(--color--ink-subtle));
1656
1707
  transition:
1657
- fill 0.2s var(--material-ease),
1708
+ color 0.2s var(--material-ease),
1658
1709
  transform 0.2s var(--material-ease);
1659
1710
  }
1660
1711
 
@@ -1666,7 +1717,7 @@ button {
1666
1717
  .Chevron:is(.Chevron--disclosure, .Chevron--menu, .Chevron--load-more),
1667
1718
  :is(button, [role="button"])[aria-expanded="true"] .Chevron.Chevron--menu,
1668
1719
  .SelectInput__control.is-open .Chevron.Chevron--menu {
1669
- fill: var(--chevron-color, var(--color--ink));
1720
+ color: var(--chevron-color, var(--color--ink));
1670
1721
  }
1671
1722
 
1672
1723
  /* The chevron reads the state of its control: aria-expanded, :disabled,
@@ -1674,7 +1725,7 @@ button {
1674
1725
  classes tell the state. */
1675
1726
  :is(:disabled, [aria-disabled="true"], .SelectInput__control.is-disabled)
1676
1727
  .Chevron:is(.Chevron--disclosure, .Chevron--menu, .Chevron--load-more) {
1677
- fill: var(--chevron-color, var(--color--ink-disabled));
1728
+ color: var(--chevron-color, var(--color--ink-disabled));
1678
1729
  }
1679
1730
 
1680
1731
  /* The spinner is larger than the box of the chevron: it goes out of the box
@@ -1684,14 +1735,15 @@ button {
1684
1735
  align-items: center;
1685
1736
  justify-content: center;
1686
1737
  }
1687
- /* The actions also show when the menu of an action is open
1688
- (.Dropdown.is-open). */
1738
+ /* The message and the actions are in the same cell of the grid, one on the
1739
+ other. Thus the slot gets the height of the taller one: actions that wrap
1740
+ on two lines make the slot taller and do not go out of it. The actions
1741
+ also show when the menu of an action is open (.Dropdown.is-open). */
1689
1742
  .EmptySlot {
1690
- position: relative;
1691
1743
  box-sizing: border-box;
1692
- display: flex;
1693
- align-items: center;
1694
- justify-content: center;
1744
+ display: grid;
1745
+ grid-template-columns: minmax(0, 1fr);
1746
+ place-items: center;
1695
1747
  width: 100%;
1696
1748
  min-height: calc(4 * var(--space-unit));
1697
1749
  padding: 0 var(--spacing-m);
@@ -1716,18 +1768,22 @@ button.EmptySlot {
1716
1768
  box-shadow: var(--focus-ring);
1717
1769
  }
1718
1770
  }
1771
+ .EmptySlot > * {
1772
+ grid-area: 1 / 1;
1773
+ }
1719
1774
  .EmptySlot__message {
1720
1775
  font-size: var(--font-size-m);
1721
1776
  color: var(--color--ink-subtle);
1722
1777
  transition: opacity 0.15s ease-out;
1723
1778
  }
1724
1779
  .EmptySlot__actions {
1725
- position: absolute;
1726
- inset: 0;
1727
1780
  display: flex;
1781
+ flex-wrap: wrap;
1728
1782
  gap: var(--spacing-s);
1729
1783
  align-items: center;
1730
1784
  justify-content: center;
1785
+ max-width: 100%;
1786
+ padding-block: var(--spacing-s);
1731
1787
  opacity: 0;
1732
1788
  transition: opacity 0.15s ease-out;
1733
1789
 
@@ -2030,24 +2086,38 @@ button.EmptySlot {
2030
2086
  width: 1rem;
2031
2087
 
2032
2088
  svg {
2033
- fill: var(--color--ink-subtle);
2089
+ color: var(--color--ink-subtle);
2034
2090
  }
2035
2091
  }
2036
- .CardList__title {
2092
+ /* The parts of the header and the trailing part of a row share the width
2093
+ in equal parts, and a part that needs less gives the rest to the others
2094
+ (see .EntityRow__title). Thus a short title stays whole next to a long
2095
+ API key, and no part becomes 0px wide. */
2096
+ :is(.CardList__title, .CardList__aside, .CardList__trailing) {
2097
+ flex: 1 1 0;
2037
2098
  min-width: 0;
2099
+ max-width: max-content;
2100
+ }
2101
+ .CardList__title {
2038
2102
  overflow: hidden;
2039
2103
  text-overflow: ellipsis;
2040
2104
  font-weight: var(--font-weight-strong);
2041
2105
  white-space: nowrap;
2042
2106
  }
2043
2107
  .CardList__aside {
2044
- flex: none;
2108
+ overflow: hidden;
2109
+ text-overflow: ellipsis;
2045
2110
  color: var(--color--ink-subtle);
2111
+ white-space: nowrap;
2046
2112
  }
2113
+ /* The pills of the part share its width as the parts of an EntityRow
2114
+ title. The gap is the gap of the header or of the row. */
2047
2115
  .CardList__trailing {
2048
- display: flex;
2049
- flex: none;
2050
- gap: var(--spacing-s);
2116
+ display: grid;
2117
+ grid-auto-columns: minmax(0, max-content);
2118
+ grid-auto-flow: column;
2119
+ gap: inherit;
2120
+ align-items: center;
2051
2121
  margin-left: auto;
2052
2122
  }
2053
2123
 
@@ -2314,7 +2384,7 @@ button.EmptySlot {
2314
2384
  display: block;
2315
2385
  width: 1em;
2316
2386
  height: 1em;
2317
- fill: var(--color--ink-subtle);
2387
+ color: var(--color--ink-subtle);
2318
2388
  }
2319
2389
  .InsertGap:is([data-near],
2320
2390
  :hover,
@@ -2328,7 +2398,7 @@ button.EmptySlot {
2328
2398
  background-color: var(--color--primary-soft--surface);
2329
2399
 
2330
2400
  svg {
2331
- fill: var(--color--primary-soft--ink);
2401
+ color: var(--color--primary-soft--ink);
2332
2402
  }
2333
2403
  }
2334
2404
  .InsertGap__bar:focus-visible & {
@@ -2381,10 +2451,19 @@ button.EmptySlot {
2381
2451
  --InsertGap-on: 1;
2382
2452
  }
2383
2453
  }
2454
+ /* A key has no spaces, thus a long key does not wrap: it ends with an
2455
+ ellipsis at the edge of its place. "clip" does not make a scroll
2456
+ container, thus the key stays on the baseline of the text around it. */
2384
2457
  .ApiKey {
2458
+ display: inline-block;
2459
+ min-width: 0;
2460
+ max-width: 100%;
2461
+ overflow: clip;
2462
+ text-overflow: ellipsis;
2385
2463
  font-family: var(--monospaced-font-family);
2386
2464
  font-size: var(--font-size-xs);
2387
2465
  color: var(--color--ink-subtle);
2466
+ white-space: nowrap;
2388
2467
  }
2389
2468
  .form {
2390
2469
  fieldset {
@@ -2430,7 +2509,7 @@ button.EmptySlot {
2430
2509
 
2431
2510
  svg {
2432
2511
  display: block;
2433
- fill: var(--color--ink-subtle);
2512
+ color: var(--color--ink-subtle);
2434
2513
  }
2435
2514
  }
2436
2515
  .form__label__info {
@@ -2466,8 +2545,11 @@ button.EmptySlot {
2466
2545
  between the fields uses it to keep the rhythm of the form. */
2467
2546
  --form-field-gap: var(--spacing-l);
2468
2547
  }
2548
+ /* In a flex row or in a grid, the field is never wider than its place, also
2549
+ when its input holds a long value without spaces */
2469
2550
  .form__field {
2470
2551
  position: relative;
2552
+ min-width: 0;
2471
2553
  margin-bottom: var(--form-field-gap);
2472
2554
  scroll-margin-top: var(--spacing-xxxl);
2473
2555
 
@@ -2642,7 +2724,7 @@ textarea:focus {
2642
2724
  display: inline-block;
2643
2725
  margin-right: 0.5em;
2644
2726
  vertical-align: middle;
2645
- fill: var(--color--ink-link);
2727
+ color: var(--color--ink-link);
2646
2728
  }
2647
2729
  }
2648
2730
  .form__hint__warning {
@@ -2656,7 +2738,7 @@ textarea:focus {
2656
2738
  display: inline-block;
2657
2739
  margin-right: 0.5em;
2658
2740
  vertical-align: middle;
2659
- fill: var(--color--warning-soft--ink);
2741
+ color: var(--color--warning-soft--ink);
2660
2742
  }
2661
2743
  }
2662
2744
  .form__input--large.form__input--large {
@@ -3060,9 +3142,12 @@ textarea:focus {
3060
3142
  .Page__content > :last-child > .Page__group:last-child {
3061
3143
  margin-bottom: 0;
3062
3144
  }
3145
+ /* When the title and the actions do not fit on one line, the actions go
3146
+ under the title. The title never shrinks under them. */
3063
3147
  .Page__group__header {
3064
3148
  display: flex;
3065
- gap: var(--spacing-m);
3149
+ flex-wrap: wrap;
3150
+ gap: var(--spacing-s) var(--spacing-m);
3066
3151
  align-items: center;
3067
3152
  justify-content: space-between;
3068
3153
  padding: var(--spacing-m) var(--Page__group-padding);
@@ -3090,17 +3175,21 @@ textarea:focus {
3090
3175
  }
3091
3176
  }
3092
3177
  .Page__group__title {
3093
- flex: 1;
3178
+ flex: 1 1 auto;
3094
3179
  min-width: 0;
3095
3180
  margin: 0;
3096
3181
  font-size: var(--font-size-l);
3097
3182
  font-weight: var(--font-weight-strong);
3098
3183
  line-height: 1.2;
3184
+ /* A word longer than the line (a German compound) breaks in its box */
3185
+ overflow-wrap: anywhere;
3099
3186
  }
3100
3187
  .Page__group__count {
3101
3188
  margin-left: var(--spacing-s);
3102
3189
  font-weight: var(--font-weight-regular);
3103
3190
  color: var(--color--ink-subtle);
3191
+ /* The title breaks anywhere, but the number stays whole */
3192
+ white-space: nowrap;
3104
3193
  }
3105
3194
  .Page__group__actions {
3106
3195
  display: flex;
@@ -3499,7 +3588,7 @@ button.Toolbar__tab {
3499
3588
  cursor: grab;
3500
3589
 
3501
3590
  svg {
3502
- fill: var(--color--ink-subtle);
3591
+ color: var(--color--ink-subtle);
3503
3592
  }
3504
3593
 
3505
3594
  @media (hover: hover) {
@@ -3794,7 +3883,7 @@ button.Toolbar__tab {
3794
3883
  }
3795
3884
  & .SidebarTree__node__icon svg,
3796
3885
  & .SidebarTree__node__actions .button:not(:hover, :focus-visible) svg {
3797
- fill: var(--color--selected--ink);
3886
+ color: var(--color--selected--ink);
3798
3887
  }
3799
3888
 
3800
3889
  &:hover {
@@ -3812,7 +3901,7 @@ button.Toolbar__tab {
3812
3901
  cursor: inherit;
3813
3902
 
3814
3903
  svg {
3815
- fill: var(--color--ink-subtle);
3904
+ color: var(--color--ink-subtle);
3816
3905
  }
3817
3906
  }
3818
3907
  /* The link or button of the row. Its "::after" covers all the row, thus a
@@ -3925,7 +4014,7 @@ span.SidebarTree__node__toggle {
3925
4014
 
3926
4015
  /* The subtle ink, as every other grip (see .DragHandle) */
3927
4016
  svg {
3928
- fill: var(--color--ink-subtle);
4017
+ color: var(--color--ink-subtle);
3929
4018
  }
3930
4019
  }
3931
4020
  .SidebarTree__node--editing {
@@ -4129,7 +4218,7 @@ span.SidebarTree__node__toggle {
4129
4218
  width: 55%;
4130
4219
  height: 55%;
4131
4220
  margin: auto;
4132
- fill: var(--Avatar-ink);
4221
+ color: var(--Avatar-ink);
4133
4222
  }
4134
4223
  }
4135
4224
  .Avatar__icon--primary {
@@ -4435,9 +4524,11 @@ span.SidebarTree__node__toggle {
4435
4524
  background-color: var(--color--surface-hover);
4436
4525
  }
4437
4526
 
4527
+ /* The hint and the error stay in the column of the label: the switch
4528
+ column is empty under the switch */
4438
4529
  .form__hint,
4439
4530
  .form__error {
4440
- margin-left: 0;
4531
+ margin-inline: 0 calc(var(--switch-width) + var(--switch-gap));
4441
4532
  }
4442
4533
 
4443
4534
  /* The switch makes the row taller than the label, thus the hint needs no
@@ -4455,10 +4546,11 @@ span.SidebarTree__node__toggle {
4455
4546
  }
4456
4547
  .SwitchInput--row {
4457
4548
  position: static;
4458
- gap: var(--spacing-m);
4549
+ gap: var(--switch-gap);
4459
4550
 
4460
4551
  .SwitchInput__label {
4461
4552
  position: static;
4553
+ flex: 1 1 auto;
4462
4554
  min-width: 0;
4463
4555
  margin-left: 0;
4464
4556
  line-height: inherit;
@@ -4478,21 +4570,20 @@ span.SidebarTree__node__toggle {
4478
4570
  .SwitchList :is(.SwitchInput__reason, .form__hint) a {
4479
4571
  position: relative;
4480
4572
  }
4573
+ /* The reason is at the end of the line of the label, because the label
4574
+ grows. When the two do not fit on one line, the reason wraps under the
4575
+ label: the width of the row decides, not the width of the window. */
4576
+ .SwitchInput__text {
4577
+ display: flex;
4578
+ flex: 1;
4579
+ flex-wrap: wrap;
4580
+ column-gap: var(--switch-gap);
4581
+ align-items: baseline;
4582
+ min-width: 0;
4583
+ }
4481
4584
  .SwitchInput__reason {
4482
- flex: none;
4585
+ flex: 0 1 auto;
4483
4586
  color: var(--color--ink-subtle);
4484
- text-align: right;
4485
- }
4486
- /* On a phone, a long reason does not push the label into a thin column */
4487
- @media (max-width: 479px) {
4488
- .SwitchInput--row {
4489
- flex-wrap: wrap;
4490
- }
4491
- .SwitchInput__reason {
4492
- flex: 1 1 100%;
4493
- order: 1;
4494
- text-align: left;
4495
- }
4496
4587
  }
4497
4588
  /* The row also has the "RowList__item" class, so it looks like a row of a
4498
4589
  RowList. The indent of the level is the left padding of the row, so the
@@ -4523,7 +4614,7 @@ span.SidebarTree__node__toggle {
4523
4614
  width: calc(1rem + var(--spacing-m) - var(--row-inset));
4524
4615
 
4525
4616
  .RowList__item--selected & svg {
4526
- fill: var(--color--selected--ink);
4617
+ color: var(--color--selected--ink);
4527
4618
  }
4528
4619
  }
4529
4620
  /* It fills all the column, so the area for a click or a drag is large. The
@@ -4547,7 +4638,7 @@ span.SidebarTree__node__toggle {
4547
4638
  cursor: not-allowed;
4548
4639
 
4549
4640
  svg {
4550
- fill: var(--color--ink-disabled);
4641
+ color: var(--color--ink-disabled);
4551
4642
  }
4552
4643
  }
4553
4644
  /* Without an image, the icon is in line with the first line of the title,
@@ -4606,13 +4697,13 @@ span.SidebarTree__node__toggle {
4606
4697
  height: 0.7em;
4607
4698
  }
4608
4699
  .ItemStatus__dot--published {
4609
- fill: var(--color--status-published--ink);
4700
+ color: var(--color--status-published--ink);
4610
4701
  }
4611
4702
  .ItemStatus__dot--outdated {
4612
- fill: var(--color--status-outdated--ink);
4703
+ color: var(--color--status-outdated--ink);
4613
4704
  }
4614
4705
  .ItemStatus__dot--draft {
4615
- fill: var(--color--status-draft--ink);
4706
+ color: var(--color--status-draft--ink);
4616
4707
  }
4617
4708
  /* See EntityRow.tsx. It has no surface and no hover: the container gives
4618
4709
  them. */
@@ -4677,7 +4768,13 @@ span.SidebarTree__node__toggle {
4677
4768
  white-space: nowrap;
4678
4769
  }
4679
4770
  .EntityRow__title {
4680
- display: flex;
4771
+ /* Each part of the line (the title, a pill, the aside) gets an equal
4772
+ share of the width, and a part that needs less gives the rest to the
4773
+ others. Thus a short title stays whole next to long pills, and no part
4774
+ becomes 0px wide: the long parts end with an ellipsis. */
4775
+ display: grid;
4776
+ grid-auto-columns: minmax(0, max-content);
4777
+ grid-auto-flow: column;
4681
4778
  gap: var(--spacing-s);
4682
4779
  align-items: center;
4683
4780
  min-width: 0;
@@ -4688,8 +4785,6 @@ span.SidebarTree__node__toggle {
4688
4785
  }
4689
4786
  }
4690
4787
  .EntityRow__title__text {
4691
- flex: 0 1 auto;
4692
- min-width: 0;
4693
4788
  overflow: hidden;
4694
4789
  text-overflow: ellipsis;
4695
4790
  white-space: nowrap;
@@ -4701,7 +4796,8 @@ span.SidebarTree__node__toggle {
4701
4796
  white-space: normal;
4702
4797
  }
4703
4798
  .EntityRow__aside {
4704
- flex: none;
4799
+ overflow: hidden;
4800
+ text-overflow: ellipsis;
4705
4801
  font-size: var(--font-size-xs);
4706
4802
  color: var(--color--ink-subtle);
4707
4803
  white-space: nowrap;
@@ -4838,7 +4934,7 @@ span.SidebarTree__node__toggle {
4838
4934
  background-color: var(--color--primary--surface);
4839
4935
  }
4840
4936
  .RowList__handle svg {
4841
- fill: var(--color--selected--ink);
4937
+ color: var(--color--selected--ink);
4842
4938
  }
4843
4939
 
4844
4940
  &:hover,
@@ -4882,7 +4978,7 @@ span.SidebarTree__node__toggle {
4882
4978
  width: 0.7em;
4883
4979
  min-width: 0.7em;
4884
4980
  }
4885
- /* The fill goes on the circle, not on the svg. A Button gives a fill to
4981
+ /* The fill goes on the circle, not on the svg. A Button gives a color to
4886
4982
  each svg in it (the color of its icons), with a stronger selector. */
4887
4983
  .FeedbackDot--success > circle {
4888
4984
  fill: var(--color--fill-success);
@@ -4900,7 +4996,8 @@ span.SidebarTree__node__toggle {
4900
4996
  .ValidityTriangle--current,
4901
4997
  .ValidityTriangle--threat {
4902
4998
  vertical-align: text-top;
4903
- fill: var(--color--fill-danger);
4999
+ /* token-audit-disable-next-line mismatch -- the triangle is a graphic mark, and its color paints its fill */
5000
+ color: var(--color--fill-danger);
4904
5001
  }
4905
5002
  .ValidityTriangle__wrapper {
4906
5003
  display: inline-flex;
@@ -5144,7 +5241,7 @@ span.SidebarTree__node__toggle {
5144
5241
  box-shadow: var(--shadow--floating);
5145
5242
 
5146
5243
  svg {
5147
- fill: var(--color--ink);
5244
+ color: var(--color--ink);
5148
5245
  }
5149
5246
  &:hover,
5150
5247
  &:focus-visible,
@@ -5183,7 +5280,6 @@ span.SidebarTree__node__toggle {
5183
5280
  flex-shrink: 0;
5184
5281
  width: 0.9em;
5185
5282
  height: 0.9em;
5186
- fill: currentColor;
5187
5283
  }
5188
5284
 
5189
5285
  span {
@@ -5406,7 +5502,7 @@ span.SidebarTree__node__toggle {
5406
5502
  cursor: not-allowed;
5407
5503
 
5408
5504
  svg {
5409
- fill: var(--color--ink-disabled);
5505
+ color: var(--color--ink-disabled);
5410
5506
  }
5411
5507
  }
5412
5508
  .Table__header {
@@ -5451,7 +5547,7 @@ span.SidebarTree__node__toggle {
5451
5547
  width: max(10px, 0.75em);
5452
5548
  height: max(10px, 0.75em);
5453
5549
  vertical-align: middle;
5454
- fill: var(--color--ink-subtle);
5550
+ color: var(--color--ink-subtle);
5455
5551
  }
5456
5552
  .Table__header-cell__cell {
5457
5553
  flex: 1;
@@ -5586,7 +5682,7 @@ span.SidebarTree__node__toggle {
5586
5682
  flex: none;
5587
5683
  width: max(10px, 0.75em);
5588
5684
  height: max(10px, 0.75em);
5589
- fill: var(--color--ink-subtle);
5685
+ color: var(--color--ink-subtle);
5590
5686
  }
5591
5687
  .Table__cell--color-transparent {
5592
5688
  opacity: 0;
@@ -5711,6 +5807,15 @@ span.SidebarTree__node__toggle {
5711
5807
  }
5712
5808
  }
5713
5809
  }
5810
+ /* The full layout with ten page numbers and the "Show" select needs about
5811
+ 44em. In a narrower toolbar, the pagination shows fewer page numbers and
5812
+ no select (see Toolbar/Pagination.tsx). */
5813
+ @container toolbar-pagination (max-width: 45em) {
5814
+ .Pagination__per-page,
5815
+ .Pagination__button--wide-only {
5816
+ display: none;
5817
+ }
5818
+ }
5714
5819
  /* See InfoList/index.tsx. The list is a description list: the margins of the
5715
5820
  browser go away. */
5716
5821
  .InfoList {
@@ -5784,21 +5889,9 @@ span.SidebarTree__node__toggle {
5784
5889
  }
5785
5890
  /* A value that opens a menu (see TextualTrigger.tsx) is a block, thus
5786
5891
  "text-align" does not move it. The automatic margin puts it at the right,
5787
- as the other values. A long value in the trigger (for example a domain)
5788
- stays on one line with an ellipsis and does not go out of the row. The text clips, not the button
5789
- (the surface of the button is out of its box). */
5892
+ as the other values. */
5790
5893
  .InfoList__row__content .Dropdown__textual-trigger {
5791
- max-width: 100%;
5792
5894
  margin-left: auto;
5793
-
5794
- > span {
5795
- min-width: 0;
5796
- overflow: hidden;
5797
- text-overflow: ellipsis;
5798
- }
5799
- > svg {
5800
- flex: none;
5801
- }
5802
5895
  }
5803
5896
  /* The smart tags of an asset (see UploadSmartTags.tsx): the tags go on
5804
5897
  more lines, at the right as the other values. The title stays at the level
@@ -5820,7 +5913,9 @@ span.SidebarTree__node__toggle {
5820
5913
  padding-right: 8px;
5821
5914
  font-weight: var(--font-weight-regular);
5822
5915
  color: var(--color--ink-subtle);
5823
- white-space: nowrap;
5916
+ /* The title wraps, thus its min-content width is small and the
5917
+ fit-content(70%) column of .InfoList__row can stop it at 70% */
5918
+ overflow-wrap: anywhere;
5824
5919
  }
5825
5920
  /* A value in a row (InfoList.Value and InfoList.User). With "is-editable"
5826
5921
  and ".button--ghost-inline" it is a button. */
@@ -5845,10 +5940,12 @@ span.SidebarTree__node__toggle {
5845
5940
  text-overflow: ellipsis;
5846
5941
  white-space: nowrap;
5847
5942
  }
5848
- /* See SettingsList.tsx */
5943
+ /* See SettingsList.tsx. The layout follows the width of the list, not of
5944
+ the viewport: a list in a narrow column gets the layout of a phone too. */
5849
5945
  .SettingsList {
5850
5946
  padding: 0;
5851
5947
  margin: 0;
5948
+ container: settings-list / inline-size;
5852
5949
  list-style: none;
5853
5950
  }
5854
5951
  /* On a narrow page, the value and the action go under the text and stay at
@@ -5890,23 +5987,23 @@ span.SidebarTree__node__toggle {
5890
5987
  text-align: right;
5891
5988
  white-space: nowrap;
5892
5989
  }
5990
+ /* A label longer than the row gets an ellipsis from the button */
5893
5991
  .SettingsList__action {
5894
5992
  flex: none;
5993
+ max-width: 100%;
5895
5994
  }
5896
5995
  /* Without a value, the action goes to the right */
5897
5996
  .SettingsList__text + .SettingsList__action {
5898
5997
  margin-left: auto;
5899
5998
  }
5900
- /* On a phone, the text, the value and the action are one under the other.
5901
- With a value, the action stays at the right of the value. Without a value,
5902
- the text of a ghost button starts on the line of the title. */
5903
- @media (max-width: 479px) {
5904
- .SettingsList__row {
5905
- display: grid;
5906
- grid-template-columns: minmax(0, 1fr) auto;
5907
- }
5999
+ /* In a narrow list, the text is on a line of its own. The value is at the
6000
+ left, and the action at the right of the value, or under it when the two
6001
+ do not fit. Without a value, the text of a ghost button starts on the
6002
+ line of the title. Under 480px, the text, the value and the action do
6003
+ not fit on one line. */
6004
+ @container settings-list (max-width: 479px) {
5908
6005
  .SettingsList__text {
5909
- grid-column: 1 / -1;
6006
+ flex-basis: 100%;
5910
6007
  }
5911
6008
  .SettingsList__value {
5912
6009
  margin-left: 0;
@@ -5914,13 +6011,16 @@ span.SidebarTree__node__toggle {
5914
6011
  overflow-wrap: anywhere;
5915
6012
  white-space: normal;
5916
6013
  }
6014
+ .SettingsList__value + .SettingsList__action {
6015
+ margin-left: auto;
6016
+ }
5917
6017
  .SettingsList__text + .SettingsList__action {
5918
- grid-column: 1;
5919
- justify-self: start;
5920
6018
  margin-left: 0;
5921
6019
 
6020
+ /* A negative margin makes the action narrower than the button, and the
6021
+ label gets an ellipsis. The translate moves only the picture. */
5922
6022
  > :is(.button--ghost, .button--ghost-alert) {
5923
- margin-left: calc(-1 * var(--button-pad-x));
6023
+ translate: calc(-1 * var(--button-pad-x));
5924
6024
  }
5925
6025
  }
5926
6026
  }
@@ -5983,6 +6083,10 @@ span.SidebarTree__node__toggle {
5983
6083
  display: flex;
5984
6084
  align-items: stretch;
5985
6085
  width: fit-content;
6086
+ /* Long labels (a translation) shrink the options, not the container: the
6087
+ control stays in its container, also as a flex item */
6088
+ min-width: 0;
6089
+ max-width: 100%;
5986
6090
  font-size: var(--font-size-m);
5987
6091
  }
5988
6092
  .SegmentedControl__button {
@@ -5990,6 +6094,7 @@ span.SidebarTree__node__toggle {
5990
6094
  gap: 0.5em;
5991
6095
  align-items: center;
5992
6096
  justify-content: center;
6097
+ min-width: 0;
5993
6098
  /* The size class sets the variables (see _button.css). The fallbacks are
5994
6099
  the values of the plain ".button" ("regular" and "large"). */
5995
6100
  padding: var(--button-pad-y, 0.7em) var(--button-pad-x, 1em);
@@ -6004,9 +6109,9 @@ span.SidebarTree__node__toggle {
6004
6109
  transition: background-color 0.2s var(--material-ease);
6005
6110
 
6006
6111
  svg {
6112
+ flex: none;
6007
6113
  width: 1em;
6008
6114
  height: 1em;
6009
- fill: currentColor;
6010
6115
  }
6011
6116
  &:hover:not(:disabled),
6012
6117
  &:focus-visible {
@@ -6024,6 +6129,11 @@ span.SidebarTree__node__toggle {
6024
6129
  opacity: var(--disabled-opacity);
6025
6130
  }
6026
6131
  }
6132
+ /* The accessible name of the option keeps the full label */
6133
+ .SegmentedControl__label {
6134
+ overflow: hidden;
6135
+ text-overflow: ellipsis;
6136
+ }
6027
6137
  .SegmentedControl--fill {
6028
6138
  width: auto;
6029
6139
 
@@ -6033,6 +6143,7 @@ span.SidebarTree__node__toggle {
6033
6143
  }
6034
6144
  /* An option with only an icon is a square, as ".button--icon-only" */
6035
6145
  .SegmentedControl--icon-only .SegmentedControl__button {
6146
+ flex-shrink: 0;
6036
6147
  width: calc(1lh + 2 * var(--button-pad-y, 0.7em));
6037
6148
  padding-inline: 0;
6038
6149
  }
@@ -6053,6 +6164,10 @@ span.SidebarTree__node__toggle {
6053
6164
  .SelectInput {
6054
6165
  --SelectInput-value-margin: 2px;
6055
6166
  --SelectInput-indicator-padding: 8px;
6167
+
6168
+ /* In a flex row or in a grid, the select is never wider than its place: a
6169
+ long value or chip ends with an ellipsis, and the indicators stay */
6170
+ min-width: 0;
6056
6171
  }
6057
6172
  .SelectInput--autosize {
6058
6173
  display: flex;
@@ -6186,7 +6301,6 @@ span.SidebarTree__node__toggle {
6186
6301
  display: block;
6187
6302
  width: max(13px, 1em);
6188
6303
  height: max(13px, 1em);
6189
- fill: currentColor;
6190
6304
  }
6191
6305
 
6192
6306
  /* The chip of a value of a multiple select. The wrapper (see
@@ -6327,7 +6441,7 @@ span.SidebarTree__node__toggle {
6327
6441
 
6328
6442
  svg {
6329
6443
  font-size: 14px;
6330
- fill: var(--color--ink-subtle);
6444
+ color: var(--color--ink-subtle);
6331
6445
  }
6332
6446
  }
6333
6447
  .SelectInput__menu-action__label {
@@ -6343,7 +6457,7 @@ span.SidebarTree__node__toggle {
6343
6457
 
6344
6458
  svg {
6345
6459
  font-size: 12px;
6346
- fill: var(--color--ink-subtle);
6460
+ color: var(--color--ink-subtle);
6347
6461
  }
6348
6462
  }
6349
6463
  /* It is the title of the second list. */
@@ -6357,6 +6471,9 @@ span.SidebarTree__node__toggle {
6357
6471
  this file. */
6358
6472
  .Dropdown {
6359
6473
  position: relative;
6474
+ /* A parent that is as wide as its content (a column with "align-items:
6475
+ flex-start") can otherwise give the trigger the full width of its label */
6476
+ max-width: 100%;
6360
6477
  }
6361
6478
  .Dropdown__spacer {
6362
6479
  position: absolute;
@@ -6369,18 +6486,24 @@ span.SidebarTree__node__toggle {
6369
6486
  align-items: center;
6370
6487
  width: 100%;
6371
6488
  width: auto;
6489
+ max-width: 100%;
6372
6490
  padding: 0;
6373
6491
  white-space: nowrap;
6374
6492
 
6493
+ /* A long value gets an ellipsis, and the chevron always shows */
6375
6494
  > span {
6376
6495
  position: relative;
6377
6496
  top: 0.06em;
6497
+ min-width: 0;
6498
+ overflow: hidden;
6499
+ text-overflow: ellipsis;
6378
6500
  }
6379
6501
  svg {
6380
6502
  display: inline-block;
6503
+ flex: none;
6381
6504
  line-height: 0.6;
6382
6505
  vertical-align: middle;
6383
- fill: var(--color--ink-subtle);
6506
+ color: var(--color--ink-subtle);
6384
6507
  }
6385
6508
  }
6386
6509
 
@@ -6544,7 +6667,6 @@ span.SidebarTree__node__toggle {
6544
6667
  > svg {
6545
6668
  flex: none;
6546
6669
  font-size: 12px;
6547
- fill: currentColor;
6548
6670
  }
6549
6671
 
6550
6672
  /* The line separates the stuck title from the options that scroll below
@@ -6624,8 +6746,8 @@ span.SidebarTree__node__toggle {
6624
6746
  top: 50%;
6625
6747
  left: 12px;
6626
6748
  font-size: 15px;
6749
+ color: var(--color--ink-subtle);
6627
6750
  pointer-events: none;
6628
- fill: var(--color--ink-subtle);
6629
6751
  transform: translateY(-50%);
6630
6752
  }
6631
6753
  /* Two classes, so this rule is stronger than the global rules of the text
@@ -6688,7 +6810,7 @@ span.SidebarTree__node__toggle {
6688
6810
  color: var(--color--ink-danger);
6689
6811
 
6690
6812
  .Dropdown__menu__option__content > svg {
6691
- fill: currentColor;
6813
+ color: inherit;
6692
6814
  }
6693
6815
  }
6694
6816
  &.is-dangerous.is-hover,
@@ -6705,7 +6827,7 @@ span.SidebarTree__node__toggle {
6705
6827
  top: 50%;
6706
6828
  /* Puts the 14px grip at the center of the gutter */
6707
6829
  left: calc((var(--Dropdown-gutter) - 14px) / 2);
6708
- fill: var(--color--ink-subtle);
6830
+ color: var(--color--ink-subtle);
6709
6831
  transform: translateY(-50%);
6710
6832
 
6711
6833
  @media (hover: hover) {
@@ -6740,7 +6862,6 @@ span.SidebarTree__node__toggle {
6740
6862
 
6741
6863
  svg {
6742
6864
  font-size: 12px;
6743
- fill: currentColor;
6744
6865
  }
6745
6866
  }
6746
6867
  .Dropdown__menu__option__chevron {
@@ -6752,7 +6873,7 @@ span.SidebarTree__node__toggle {
6752
6873
 
6753
6874
  svg {
6754
6875
  font-size: 12px;
6755
- fill: var(--color--ink-subtle);
6876
+ color: var(--color--ink-subtle);
6756
6877
  }
6757
6878
  }
6758
6879
  .Dropdown__menu__option__validity_icon {
@@ -6776,18 +6897,18 @@ span.SidebarTree__node__toggle {
6776
6897
  flex: none;
6777
6898
  font-size: 16px;
6778
6899
  vertical-align: middle;
6779
- fill: var(--color--ink-subtle);
6900
+ color: var(--color--ink-subtle);
6780
6901
  }
6781
6902
  /* Plugin-injected actions render their icon through .PluginIcon; normalize it
6782
- to match native option icons (muted fill, sizing and spacing). */
6903
+ to match native option icons (muted color, sizing and spacing). */
6783
6904
  .PluginIcon {
6784
6905
  margin-right: 0;
6785
6906
  font-size: 16px;
6786
6907
  }
6787
- /* The rule of _PluginIcon.css (fill: currentColor) comes later in the
6908
+ /* The rule of _PluginIcon.css (color: inherit) comes later in the
6788
6909
  styles: the two classes make this rule stronger */
6789
6910
  > .PluginIcon.PluginIcon--svg {
6790
- fill: var(--color--ink-subtle);
6911
+ color: var(--color--ink-subtle);
6791
6912
  }
6792
6913
  /* At a 16px font size, the emoji glyph fills the box as much as an SVG
6793
6914
  icon */
@@ -6854,7 +6975,7 @@ span.SidebarTree__node__toggle {
6854
6975
  border-radius: var(--radius-s);
6855
6976
 
6856
6977
  svg {
6857
- fill: var(--color--ink-subtle);
6978
+ color: var(--color--ink-subtle);
6858
6979
  }
6859
6980
  }
6860
6981
  /* The button is a square as tall as the option. The negative margin takes
@@ -6878,16 +6999,16 @@ button.Dropdown__menu__option__icon {
6878
6999
  background-color: var(--color--surface-raised-active);
6879
7000
 
6880
7001
  svg {
6881
- fill: var(--color--ink);
7002
+ color: var(--color--ink);
6882
7003
  }
6883
7004
  }
6884
7005
  }
6885
7006
  .Dropdown__menu__option__icon--delete svg {
6886
- fill: var(--color--danger-soft--ink);
7007
+ color: var(--color--danger-soft--ink);
6887
7008
  }
6888
7009
  button.Dropdown__menu__option__icon--delete:hover svg,
6889
7010
  button.Dropdown__menu__option__icon--delete:focus-visible svg {
6890
- fill: var(--color--danger-soft--ink);
7011
+ color: var(--color--danger-soft--ink);
6891
7012
  }
6892
7013
  .Dropdown__menu__separator {
6893
7014
  height: 1px;
@@ -7145,7 +7266,7 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7145
7266
  background: var(--color--surface-muted);
7146
7267
 
7147
7268
  & .Callout__icon svg {
7148
- fill: var(--color--ink-subtle);
7269
+ color: var(--color--ink-subtle);
7149
7270
  }
7150
7271
  }
7151
7272
 
@@ -7156,7 +7277,7 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7156
7277
  background: var(--color--success-soft--surface);
7157
7278
 
7158
7279
  & .Callout__icon svg {
7159
- fill: var(--color--success-soft--ink);
7280
+ color: var(--color--success-soft--ink);
7160
7281
  }
7161
7282
  }
7162
7283
 
@@ -7165,7 +7286,7 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7165
7286
  background: var(--color--warning-soft--surface);
7166
7287
 
7167
7288
  & .Callout__icon svg {
7168
- fill: var(--color--warning-soft--ink);
7289
+ color: var(--color--warning-soft--ink);
7169
7290
  }
7170
7291
  }
7171
7292
 
@@ -7174,7 +7295,7 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7174
7295
  background: var(--color--danger-soft--surface);
7175
7296
 
7176
7297
  & .Callout__icon svg {
7177
- fill: var(--color--danger-soft--ink);
7298
+ color: var(--color--danger-soft--ink);
7178
7299
  }
7179
7300
  }
7180
7301
  .SidebarPanel {
@@ -7269,7 +7390,9 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7269
7390
  flex-direction: row;
7270
7391
  gap: var(--spacing-m);
7271
7392
  align-items: center;
7272
- justify-content: center;
7393
+ /* Content that is too wide starts at the left edge: an overflow past the
7394
+ left edge cannot scroll into view. */
7395
+ justify-content: safe center;
7273
7396
  min-width: 0;
7274
7397
  min-height: var(--Toolbar-height);
7275
7398
  > *:last-child {
@@ -7401,14 +7524,14 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7401
7524
  & svg {
7402
7525
  width: 12px;
7403
7526
  height: 12px;
7404
- fill: var(--color--ink-subtle);
7527
+ color: var(--color--ink-subtle);
7405
7528
  }
7406
7529
  &:hover,
7407
7530
  &.is-open {
7408
7531
  background: var(--color--surface-hover);
7409
7532
 
7410
7533
  & svg {
7411
- fill: var(--color--ink);
7534
+ color: var(--color--ink);
7412
7535
  }
7413
7536
  }
7414
7537
  }
@@ -7455,8 +7578,12 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7455
7578
  white-space: nowrap;
7456
7579
  }
7457
7580
  /* A subtitle that opens a menu (see TextualDropdown.tsx): it must not clip
7458
- the hover surface of its trigger */
7581
+ the hover surface of its trigger. It shrinks with the title, and its
7582
+ trigger gets the ellipsis, thus a long value does not push the title to
7583
+ 0px. */
7459
7584
  .Toolbar__subtitle--dropdown {
7585
+ flex-shrink: 1;
7586
+ min-width: 0;
7460
7587
  overflow: visible;
7461
7588
  }
7462
7589
  /* A long name of a saved filter shows an ellipsis, thus the title keeps its
@@ -7474,13 +7601,60 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7474
7601
  .Toolbar__space {
7475
7602
  flex: 1;
7476
7603
  }
7604
+ /* It takes the free width of the toolbar, thus it is the container of the
7605
+ narrow layout of the pagination (see "_Pagination.css"). After a title,
7606
+ the pages go at the right end, as after a Toolbar.Space. */
7607
+ .Toolbar__pagination {
7608
+ display: flex;
7609
+ flex: 1;
7610
+ gap: var(--spacing-m);
7611
+ align-items: center;
7612
+ justify-content: safe center;
7613
+ min-width: 0;
7614
+ container: toolbar-pagination / inline-size;
7615
+
7616
+ &:not(:only-child) {
7617
+ justify-content: safe flex-end;
7618
+ }
7619
+ }
7477
7620
  .Toolbar__fill {
7478
7621
  display: flex;
7479
7622
  flex: 1;
7480
7623
  }
7624
+ /* The widths of the two edge fades of .Toolbar__tabs. They must be
7625
+ registered: an animation cannot interpolate a custom property that is not
7626
+ registered. */
7627
+ @property --Toolbar__tabs-fade-start {
7628
+ syntax: "<length>";
7629
+ inherits: false;
7630
+ initial-value: 0px;
7631
+ }
7632
+ @property --Toolbar__tabs-fade-end {
7633
+ syntax: "<length>";
7634
+ inherits: false;
7635
+ initial-value: 0px;
7636
+ }
7637
+ @keyframes Toolbar__tabs-fade-start {
7638
+ to {
7639
+ --Toolbar__tabs-fade-start: var(--Toolbar__tabs-fade);
7640
+ }
7641
+ }
7642
+ @keyframes Toolbar__tabs-fade-end {
7643
+ from {
7644
+ --Toolbar__tabs-fade-end: var(--Toolbar__tabs-fade);
7645
+ }
7646
+ }
7481
7647
  /* It fills the full height of the toolbar, thus the line under the active tab
7482
- touches the bottom border of the toolbar. */
7648
+ touches the bottom border of the toolbar.
7649
+
7650
+ The scrollbar is hidden, thus an edge fades when tabs are hidden past it.
7651
+ The fade is a mask, thus it works on any background. Each fade follows
7652
+ the scroll of the strip: it grows in the first and the last
7653
+ --Toolbar__tabs-fade of the scroll. A strip that does not scroll has no
7654
+ active timeline, thus no fade. */
7483
7655
  .Toolbar__tabs {
7656
+ --Toolbar__tabs-fade: var(--spacing-xl);
7657
+
7484
7658
  display: flex;
7485
7659
  flex: 0 1 auto;
7486
7660
  align-self: stretch;
@@ -7489,6 +7663,20 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7489
7663
  overflow-x: auto;
7490
7664
  white-space: nowrap;
7491
7665
  scrollbar-width: none;
7666
+ mask-image: linear-gradient(
7667
+ to right,
7668
+ transparent,
7669
+ #000 var(--Toolbar__tabs-fade-start),
7670
+ #000 calc(100% - var(--Toolbar__tabs-fade-end)),
7671
+ transparent
7672
+ );
7673
+ animation:
7674
+ Toolbar__tabs-fade-start linear both,
7675
+ Toolbar__tabs-fade-end linear both;
7676
+ animation-timeline: scroll(self inline), scroll(self inline);
7677
+ animation-range:
7678
+ 0 var(--Toolbar__tabs-fade),
7679
+ calc(100% - var(--Toolbar__tabs-fade)) 100%;
7492
7680
  -webkit-overflow-scrolling: touch;
7493
7681
  -ms-overflow-style: -ms-autohiding-scrollbar;
7494
7682
 
@@ -7540,10 +7728,13 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7540
7728
  background-color: var(--color--primary--surface);
7541
7729
  }
7542
7730
  }
7731
+ /* A button element is as wide as its content, also as a flex box, thus it
7732
+ needs "max-width" to stay in the title. */
7543
7733
  .Toolbar__title--dropdown {
7544
7734
  display: flex;
7545
7735
  align-items: center;
7546
7736
  min-width: 0;
7737
+ max-width: 100%;
7547
7738
  padding: 0;
7548
7739
  font: inherit;
7549
7740
  color: inherit;
@@ -7604,7 +7795,7 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7604
7795
  font-size: 1.1em;
7605
7796
 
7606
7797
  svg {
7607
- fill: var(--color--ink);
7798
+ color: var(--color--ink);
7608
7799
  }
7609
7800
  }
7610
7801
  /* The filter has no field look, so the disabled state only dims it. The
@@ -7619,7 +7810,7 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7619
7810
  }
7620
7811
  }
7621
7812
  .Toolbar__filter__icon--disabled svg {
7622
- fill: var(--color--ink-disabled);
7813
+ color: var(--color--ink-disabled);
7623
7814
  }
7624
7815
 
7625
7816
  /* The menu of the title. Its button has no surface until hover, thus the
@@ -7764,11 +7955,11 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7764
7955
  }
7765
7956
  svg:first-child {
7766
7957
  margin-right: 10px;
7767
- fill: var(--color--ink);
7958
+ color: var(--color--ink);
7768
7959
  }
7769
7960
  svg:last-child {
7770
7961
  margin-left: 10px;
7771
- fill: var(--color--ink-subtle);
7962
+ color: var(--color--ink-subtle);
7772
7963
  }
7773
7964
  svg:first-child:last-child {
7774
7965
  margin-right: 0;
@@ -7793,7 +7984,6 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7793
7984
  }
7794
7985
  svg {
7795
7986
  display: block;
7796
- fill: currentColor;
7797
7987
  }
7798
7988
  &:is(:not(:where(:disabled, .is-disabled, [aria-disabled='true']))):hover {
7799
7989
  background: var(--color--surface-hover);
@@ -7858,7 +8048,7 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7858
8048
  > svg {
7859
8049
  flex: none;
7860
8050
  font-size: 16px;
7861
- fill: var(--color--ink-subtle);
8051
+ color: var(--color--ink-subtle);
7862
8052
  }
7863
8053
  }
7864
8054
  .EntitySummary__image {
@@ -7997,11 +8187,13 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7997
8187
  svg {
7998
8188
  width: 2em;
7999
8189
  height: 2em;
8000
- fill: currentColor;
8001
8190
  }
8002
8191
  }
8192
+ /* The text can wrap a long word, thus the option is never wider than the
8193
+ group */
8003
8194
  .RadioGroupInput__body {
8004
8195
  align-self: center;
8196
+ min-width: 0;
8005
8197
  margin-left: calc(1.5 * var(--space-unit));
8006
8198
  }
8007
8199
  .RadioGroupInput__label {
@@ -8136,7 +8328,7 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
8136
8328
  flex-shrink: 0;
8137
8329
  width: 1rem;
8138
8330
  height: 1rem;
8139
- fill: var(--color--ink-subtle);
8331
+ color: var(--color--ink-subtle);
8140
8332
  }
8141
8333
  }
8142
8334
  /* The padding is the inset above the first group and below the last group:
@@ -8162,7 +8354,7 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
8162
8354
  .SettingsMenu__end--new-tab svg {
8163
8355
  width: 0.75em;
8164
8356
  height: 0.75em;
8165
- fill: var(--color--ink-subtle);
8357
+ color: var(--color--ink-subtle);
8166
8358
  }
8167
8359
  .IdText {
8168
8360
  font-family: var(--monospaced-font-family);
@@ -8507,7 +8699,6 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
8507
8699
 
8508
8700
  svg {
8509
8701
  display: block;
8510
- fill: currentColor;
8511
8702
  }
8512
8703
  .SplitViewSash__content:hover & {
8513
8704
  color: var(--color--ink);
@@ -8575,7 +8766,6 @@ body.SplitView--disable-select {
8575
8766
 
8576
8767
  svg {
8577
8768
  display: block;
8578
- fill: currentColor;
8579
8769
  }
8580
8770
  }
8581
8771
 
@@ -8733,7 +8923,6 @@ body.SplitView--disable-select {
8733
8923
  }
8734
8924
  > svg {
8735
8925
  flex: none;
8736
- fill: currentColor;
8737
8926
  }
8738
8927
  > .ItemTypeEmoji {
8739
8928
  flex: none;