baseline-foundry 0.1.5 → 0.1.7

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
@@ -1254,14 +1254,21 @@ html.u-baseline-grid::after {
1254
1254
  padding and trailing baseline compensation must resolve through this pair. */
1255
1255
  --bf-single-line-row-padding-block: max(0rem, calc(var(--bf-button-block-padding) - var(--bf-border-width)));
1256
1256
  --bf-single-line-row-margin-block-end: calc(0rem + mod(calc(var(--bf-baseline) - mod(calc(var(--bf-body-line-height, 1.5rem) + (var(--bf-button-block-padding) * 2)), var(--bf-baseline))), var(--bf-baseline)));
1257
+ --bf-single-line-row-block-size: calc(var(--bf-body-line-height, 1.5rem) + (var(--bf-single-line-row-padding-block) * 2) + (var(--bf-border-width) * 2) + var(--bf-single-line-row-margin-block-end));
1258
+ --bf-single-line-row-in-box-padding-block-start: var(--bf-body-nudge-start, 0.41rem);
1259
+ --bf-single-line-row-in-box-padding-block-end: max(0rem, calc(var(--bf-single-line-row-block-size) - var(--bf-body-line-height, 1.5rem) - var(--bf-single-line-row-in-box-padding-block-start)));
1257
1260
  --bf-single-line-row-visual-offset: calc(var(--bf-body-nudge-start, 0.41rem) + ((var(--bf-body-line-height, 1.5rem) - var(--bf-control-visual-size)) / 2));
1261
+ /* Auxiliary surfaces may opt into a host-owned nested composition. The
1262
+ shorter line and capped symmetric padding fit their complete paint inside
1263
+ the host body line without introducing a second row rhythm. */
1264
+ --bf-nested-auxiliary-line-height: max(var(--bf-body-font-size), calc(var(--bf-body-line-height) - var(--bf-baseline)));
1265
+ --bf-nested-auxiliary-padding-block: min(var(--bf-single-line-row-padding-block), max(0rem, calc((var(--bf-body-line-height) - var(--bf-nested-auxiliary-line-height)) / 2)));
1258
1266
  --bf-slider-track-size: calc(var(--bf-baseline) * 0.25);
1259
- --bf-slider-row-block-size: max(var(--bf-control-box-size-compact), calc(var(--bf-body-nudge-start, 0.41rem) + var(--bf-body-line-height, 1.5rem) + var(--bf-body-nudge-end)));
1267
+ --bf-slider-row-block-size: var(--bf-single-line-row-block-size);
1260
1268
  --bf-slider-track-offset: calc(var(--bf-body-nudge-start, 0.41rem) + ((var(--bf-body-line-height, 1.5rem) - var(--bf-slider-track-size)) / 2));
1261
1269
  --bf-table-row-border-size: var(--bf-border-width);
1262
- --bf-table-row-padding-block-start: var(--bf-body-nudge-start, 0.41rem);
1263
- --bf-table-row-content-size: calc(var(--bf-body-line-height, 1.5rem) + (var(--bf-table-row-padding-block-start) * 2) + var(--bf-table-row-border-size));
1264
- --bf-table-row-block-size: calc(var(--bf-table-row-content-size) + mod(calc(var(--bf-baseline) - mod(var(--bf-table-row-content-size), var(--bf-baseline))), var(--bf-baseline)));
1270
+ --bf-table-row-padding-block-start: var(--bf-single-line-row-in-box-padding-block-start);
1271
+ --bf-table-row-block-size: var(--bf-single-line-row-block-size);
1265
1272
  --bf-table-row-padding-block-end: max(0rem, calc(var(--bf-table-row-block-size) - var(--bf-body-line-height, 1.5rem) - var(--bf-table-row-padding-block-start) - var(--bf-table-row-border-size)));
1266
1273
  --bf-table-row-line-height: var(--bf-body-line-height, 1.5rem);
1267
1274
  --bf-switch-track-offset: var(--bf-single-line-row-visual-offset);
@@ -1311,7 +1318,8 @@ html.u-baseline-grid::after {
1311
1318
  --bf-top-navigation-logo-tag-gap: 0.25rem;
1312
1319
  --bf-top-navigation-logo-icon-bottom-offset: 0.375rem;
1313
1320
  --bf-top-navigation-logo-icon-optical-offset-inline: -0.0125rem;
1314
- --bf-navigation-brand-title-optical-offset-block: 0rem;
1321
+ --bf-navigation-brand-line-center-block: calc(var(--bf-top-navigation-logo-tag-block-size) - var(--bf-top-navigation-logo-icon-bottom-offset) - (var(--bf-top-navigation-logo-icon-size) / 2));
1322
+ --bf-navigation-brand-block-size: calc(var(--bf-navigation-brand-line-center-block) * 2);
1315
1323
  --bf-icon-size-default: 1rem;
1316
1324
  --bf-icon-size-medium: 2.5rem;
1317
1325
  --bf-icon-size-large: 4rem;
@@ -1321,6 +1329,7 @@ html.u-baseline-grid::after {
1321
1329
  --bf-leading-icon-gap: var(--bf-leading-mark-gap);
1322
1330
  --bf-leading-icon-offset: var(--bf-single-line-row-visual-offset);
1323
1331
  --bf-ui-chip-padding-inline: var(--bf-component-inline-inset-field);
1332
+ --bf-ui-chip-radius: 999rem;
1324
1333
  --bf-ui-badge-padding-inline: calc(var(--bf-body-line-height, 1.5rem) * 0.25);
1325
1334
  --bf-ui-badge-overhang: calc(var(--bf-ui-badge-padding-inline) * -0.75);
1326
1335
  --bf-grid-max-inline-size: var(--bf-content-max-width);
@@ -1557,7 +1566,7 @@ html.u-baseline-grid::after {
1557
1566
  margin: 0;
1558
1567
  }
1559
1568
 
1560
- .bf-theme button {
1569
+ :where(.bf-theme) :where(button) {
1561
1570
  font: inherit;
1562
1571
  }
1563
1572
 
@@ -1686,10 +1695,33 @@ html.u-baseline-grid::after {
1686
1695
  padding-inline: var(--bf-component-inline-inset-field);
1687
1696
  }
1688
1697
 
1689
- :where(.bf-theme) :where(input[type='color'].bf-color-input) {
1698
+ :where(.bf-theme) :where(.bf-color-control) {
1699
+ display: grid;
1700
+ grid-template-areas: "color-control";
1690
1701
  inline-size: 4rem;
1691
- min-block-size: var(--bf-control-box-size);
1692
- padding: calc(var(--bf-baseline) * 0.5);
1702
+ }
1703
+
1704
+ /* Native color inputs do not expose a body-text line box. This invisible
1705
+ metric strut gives their wrapper the same natural padding/border/margin
1706
+ construction as every textual control, including under browser zoom. */
1707
+ :where(.bf-theme) :where(.bf-color-control)::before {
1708
+ border-block: var(--bf-border-width) solid transparent;
1709
+ content: "\00a0";
1710
+ grid-area: color-control;
1711
+ line-height: var(--bf-body-line-height);
1712
+ margin-bottom: var(--bf-single-line-row-margin-block-end);
1713
+ padding-block: var(--bf-single-line-row-padding-block);
1714
+ visibility: hidden;
1715
+ }
1716
+
1717
+ :where(.bf-theme) :where(.bf-color-control) > :where(input[type='color'].bf-color-input) {
1718
+ align-self: stretch;
1719
+ block-size: auto;
1720
+ grid-area: color-control;
1721
+ inline-size: 100%;
1722
+ margin-bottom: var(--bf-single-line-row-margin-block-end);
1723
+ min-block-size: 0;
1724
+ padding: var(--bf-border-width);
1693
1725
  }
1694
1726
 
1695
1727
  :where(.bf-theme) :where(.bf-input, input[type='text'], input[type='number'], input[type='search'], input[type='password'], input[type='email'], input[type='url'], textarea, select):hover {
@@ -1730,13 +1762,12 @@ html.u-baseline-grid::after {
1730
1762
  line-height: var(--bf-body-line-height, 1.5rem);
1731
1763
  background: transparent;
1732
1764
  border: 0 solid transparent;
1733
- border-bottom: var(--bf-border-width) solid var(--bf-color-border-default);
1734
- border-top: var(--bf-border-width) solid transparent;
1765
+ box-shadow: inset 0 calc(var(--bf-border-width) * -1) 0 var(--bf-color-border-default);
1735
1766
  color: var(--bf-color-text-default);
1736
1767
  margin-bottom: calc(0rem + mod(calc(var(--bf-baseline) - mod(calc(var(--bf-body-line-height, 1.5rem) + (var(--bf-input-block-padding) * 2)), var(--bf-baseline))), var(--bf-baseline)));
1737
1768
  max-inline-size: 100%;
1738
1769
  min-inline-size: 0;
1739
- padding-block: max(0rem, calc(var(--bf-input-block-padding) - var(--bf-border-width)));
1770
+ padding-block: 0;
1740
1771
  padding-inline: 0;
1741
1772
  width: 100%;
1742
1773
  }
@@ -1754,8 +1785,8 @@ html.u-baseline-grid::after {
1754
1785
  color: var(--bf-color-text-default);
1755
1786
  cursor: pointer;
1756
1787
  margin-inline-end: var(--bf-field-gap);
1757
- min-block-size: var(--bf-control-box-size-compact);
1758
- padding-block: max(0rem, calc(var(--bf-control-block-padding-compact) - var(--bf-border-width)));
1788
+ min-block-size: 0;
1789
+ padding-block: var(--bf-single-line-row-padding-block);
1759
1790
  padding-inline: var(--bf-control-inline-padding-action-bordered);
1760
1791
  }
1761
1792
 
@@ -2115,6 +2146,15 @@ html.u-baseline-grid::after {
2115
2146
  padding: 0;
2116
2147
  }
2117
2148
 
2149
+ /* A composite slider's numeric field owns the shared occupied row. Stretching
2150
+ the track within that real sibling height avoids a second nominal-height
2151
+ calculation that can diverge when rem borders are rasterised under zoom. */
2152
+ :where(.bf-theme) :where(.bf-slider:not(.is-stacked)):not(:where(.bf-field.is-range.is-stacked) :where(.bf-slider)) > :where(input[type='range']) {
2153
+ align-self: stretch;
2154
+ block-size: auto;
2155
+ margin-block: 0;
2156
+ }
2157
+
2118
2158
  :where(.bf-theme) :where(input[type='range']):focus:not(:focus-visible) {
2119
2159
  outline: none;
2120
2160
  }
@@ -4448,10 +4488,6 @@ html.u-baseline-grid::after {
4448
4488
  inline-size: 100%;
4449
4489
  }
4450
4490
 
4451
- :where(.bf-theme) :where(.bf-panel-header.is-navigation-brand) :where(.bf-top-navigation-logo-title) {
4452
- transform: translateY(var(--bf-navigation-brand-title-optical-offset-block));
4453
- }
4454
-
4455
4491
  :where(.bf-theme) :where(.bf-panel-header) > :where(.bf-panel-title) {
4456
4492
  min-inline-size: 0;
4457
4493
  }
@@ -6068,10 +6104,6 @@ html.u-baseline-grid::after {
6068
6104
  border-block-end-color: var(--bf-color-border-low-contrast);
6069
6105
  }
6070
6106
 
6071
- :where(.bf-theme) :where(tbody tr:has(.bf-status-label) > td) {
6072
- padding-block: calc((var(--bf-baseline) - var(--bf-table-row-border-size)) / 2);
6073
- }
6074
-
6075
6107
  :where(.bf-theme) :where(tbody tr:hover td) {
6076
6108
  background: color-mix(in srgb, var(--bf-color-background-hover) 68%, transparent);
6077
6109
  }
@@ -6092,7 +6124,7 @@ html.u-baseline-grid::after {
6092
6124
  align-items: baseline;
6093
6125
  background-color: var(--bf-ui-chip-background);
6094
6126
  border: var(--bf-border-width) solid var(--bf-ui-chip-border);
6095
- border-radius: 1rem;
6127
+ border-radius: var(--bf-ui-chip-radius);
6096
6128
  color: var(--bf-color-text-default);
6097
6129
  display: inline-flex;
6098
6130
  gap: 0;
@@ -6281,6 +6313,45 @@ html.u-baseline-grid::after {
6281
6313
  --bf-ui-status-color: var(--bf-color-button-negative-text);
6282
6314
  }
6283
6315
 
6316
+ /* Nested auxiliary surfaces fit a body-sized flex/grid host instead of
6317
+ carrying a second standalone occupied-row contract. This modifier is
6318
+ explicit so component density never changes merely because of ancestry. */
6319
+ :where(.bf-theme) :where(.bf-chip.is-nested, .bf-status-label.is-nested) {
6320
+ line-height: var(--bf-nested-auxiliary-line-height);
6321
+ margin-block: 0;
6322
+ padding-block: var(--bf-nested-auxiliary-padding-block);
6323
+ }
6324
+
6325
+ :where(.bf-theme) :where(.bf-chip.is-nested) {
6326
+ border: 0;
6327
+ box-shadow: inset 0 0 0 var(--bf-border-width) var(--bf-ui-chip-border);
6328
+ }
6329
+
6330
+ /* Chip parts normally carry the standalone body line explicitly. A compact
6331
+ chip must pass its reduced line through to those parts so a nested badge
6332
+ can fit without making the host row taller. */
6333
+ :where(.bf-theme) :where(.bf-chip.is-nested) :where(.bf-chip-lead, .bf-chip-value) {
6334
+ line-height: inherit;
6335
+ }
6336
+
6337
+ :where(.bf-theme) :where(.bf-chip.is-nested:hover) {
6338
+ box-shadow: inset 0 0 0 var(--bf-border-width) var(--bf-ui-chip-border-hover);
6339
+ }
6340
+
6341
+ :where(.bf-theme) :where(.bf-chip.is-nested:is(:active, [aria-pressed='true'], .is-selected)) {
6342
+ box-shadow: inset 0 0 0 var(--bf-border-width) var(--bf-ui-chip-border-active);
6343
+ }
6344
+
6345
+ :where(.bf-theme) :where(.bf-status-label.is-nested) {
6346
+ border-block-width: 0;
6347
+ }
6348
+
6349
+ :where(.bf-theme) :where(.bf-badge.is-nested) {
6350
+ align-self: center;
6351
+ line-height: var(--bf-nested-auxiliary-line-height);
6352
+ vertical-align: middle;
6353
+ }
6354
+
6284
6355
 
6285
6356
  :where(.bf-theme) :where(.bf-chip-dismiss, .bf-search-box-reset, .bf-search-and-filter-clear) {
6286
6357
  appearance: none;
@@ -6725,6 +6796,7 @@ html.u-baseline-grid::after {
6725
6796
  --bf-side-navigation-disclosure-inset: max(0rem, calc(var(--bf-component-inline-inset-continuation) - var(--bf-disclosure-icon-inline-size) - var(--bf-disclosure-gap)));
6726
6797
  --bf-side-navigation-depth-step: var(--bf-space-2);
6727
6798
  --bf-side-navigation-group-gap: 1.5rem;
6799
+ --bf-side-navigation-heading-list-gap: 0.5rem;
6728
6800
  color: var(--bf-color-text-inactive);
6729
6801
  display: block;
6730
6802
  inline-size: 100%;
@@ -6737,11 +6809,31 @@ html.u-baseline-grid::after {
6737
6809
  }
6738
6810
 
6739
6811
  :where(.bf-theme) :where(.bf-side-navigation-group) {
6812
+ display: grid;
6813
+ gap: var(--bf-side-navigation-heading-list-gap);
6814
+ min-inline-size: 0;
6815
+ }
6816
+
6817
+ /* Keep the divider and heading as one tight header. The group owns only the
6818
+ larger transition from that header to its list, so the compensated rule
6819
+ cannot change the heading/list phase. */
6820
+ :where(.bf-theme) :where(.bf-side-navigation-group-header) {
6740
6821
  display: grid;
6741
6822
  gap: 0rem;
6742
6823
  min-inline-size: 0;
6743
6824
  }
6744
6825
 
6826
+ :where(.bf-theme) :where(.bf-side-navigation-group-header) > hr {
6827
+ inline-size: auto;
6828
+ margin-inline: var(--bf-side-navigation-content-inset) 0;
6829
+ }
6830
+
6831
+ /* A single-line group heading occupies four baselines. min-block-size keeps
6832
+ that phase exact while still allowing a long heading to wrap and grow. */
6833
+ :where(.bf-theme) :where(.bf-side-navigation-group-header) > :where(.bf-side-navigation-heading) {
6834
+ min-block-size: calc((var(--bf-baseline) * 4) - var(--bf-body-margin-bottom));
6835
+ }
6836
+
6745
6837
  :where(.bf-theme) :where(.bf-side-navigation-drawer) {
6746
6838
  background: var(--bf-color-background-default);
6747
6839
  bottom: 0;
@@ -6870,6 +6962,7 @@ html.u-baseline-grid::after {
6870
6962
 
6871
6963
  :where(.bf-theme) :where(.bf-side-navigation-list) {
6872
6964
  display: grid;
6965
+ grid-auto-rows: var(--bf-single-line-row-block-size);
6873
6966
  list-style: none;
6874
6967
  margin: 0;
6875
6968
  padding: 0;
@@ -6888,6 +6981,7 @@ html.u-baseline-grid::after {
6888
6981
  font-weight: var(--bf-body-font-weight, 400);
6889
6982
  line-height: var(--bf-body-line-height, 1.5rem);
6890
6983
  align-items: center;
6984
+ align-self: start;
6891
6985
  background: transparent;
6892
6986
  border: 0;
6893
6987
  border-block: var(--bf-border-width) solid transparent;
@@ -7625,7 +7719,8 @@ html.u-baseline-grid::after {
7625
7719
  display: block;
7626
7720
  margin: 0;
7627
7721
  overflow: hidden;
7628
- padding-block: var(--bf-control-block-padding-compact);
7722
+ padding-block-end: var(--bf-single-line-row-in-box-padding-block-end);
7723
+ padding-block-start: var(--bf-single-line-row-in-box-padding-block-start);
7629
7724
  padding-inline: var(--bf-component-inline-inset-action);
7630
7725
  text-align: left;
7631
7726
  text-decoration: none;
@@ -8714,13 +8809,11 @@ html.u-baseline-grid::after {
8714
8809
  line-height: var(--bf-top-navigation-logo-title-line-height, var(--bf-body-line-height, 1.5));
8715
8810
  overflow: visible;
8716
8811
  overflow-wrap: anywhere;
8717
- /* The first title line and the 1rem mark share the mark's fixed centre:
8718
- * tag block-end minus the 0.375rem inset minus half the mark. Symmetric title
8719
- * padding keeps the occupied row stable across all four type-density tiers. */
8812
+ /* The first title line and the 1rem mark share the public brand-line centre.
8813
+ * The derived brand block is twice that fixed centre, so the orange tag can
8814
+ * extend upward without changing the title or adjacent-header baseline. */
8720
8815
  padding-block: calc(
8721
- var(--bf-top-navigation-logo-tag-block-size)
8722
- - var(--bf-top-navigation-logo-icon-bottom-offset)
8723
- - (var(--bf-top-navigation-logo-icon-size) / 2)
8816
+ var(--bf-navigation-brand-line-center-block)
8724
8817
  - (var(--bf-top-navigation-logo-title-line-height, var(--bf-body-line-height, 1.5rem)) / 2)
8725
8818
  );
8726
8819
  text-overflow: clip;
@@ -9733,6 +9826,12 @@ html.u-baseline-grid::after {
9733
9826
  line-height: var(--bf-body-line-height);
9734
9827
  }
9735
9828
 
9829
+ /* Preserve the public nested fit after the preset's general typography pass.
9830
+ The modifier remains explicit and zero-specificity in every app scope. */
9831
+ :where(.bf-theme.bf-tier-app) :where(.bf-status-label.is-nested, .bf-chip.is-nested) {
9832
+ line-height: var(--bf-nested-auxiliary-line-height);
9833
+ }
9834
+
9736
9835
  :where(.bf-theme.bf-tier-app) :where(.bf-input, .bf-button, .bf-button.is-base) {
9737
9836
  font-family: inherit;
9738
9837
  font-size: var(--bf-body-font-size);
@@ -1254,14 +1254,21 @@ html.u-baseline-grid::after {
1254
1254
  padding and trailing baseline compensation must resolve through this pair. */
1255
1255
  --bf-single-line-row-padding-block: max(0rem, calc(var(--bf-button-block-padding) - var(--bf-border-width)));
1256
1256
  --bf-single-line-row-margin-block-end: calc(0rem + mod(calc(var(--bf-baseline) - mod(calc(var(--bf-body-line-height, 1.25rem) + (var(--bf-button-block-padding) * 2)), var(--bf-baseline))), var(--bf-baseline)));
1257
+ --bf-single-line-row-block-size: calc(var(--bf-body-line-height, 1.25rem) + (var(--bf-single-line-row-padding-block) * 2) + (var(--bf-border-width) * 2) + var(--bf-single-line-row-margin-block-end));
1258
+ --bf-single-line-row-in-box-padding-block-start: var(--bf-body-nudge-start, 0.0775rem);
1259
+ --bf-single-line-row-in-box-padding-block-end: max(0rem, calc(var(--bf-single-line-row-block-size) - var(--bf-body-line-height, 1.25rem) - var(--bf-single-line-row-in-box-padding-block-start)));
1257
1260
  --bf-single-line-row-visual-offset: calc(var(--bf-body-nudge-start, 0.0775rem) + ((var(--bf-body-line-height, 1.25rem) - var(--bf-control-visual-size)) / 2));
1261
+ /* Auxiliary surfaces may opt into a host-owned nested composition. The
1262
+ shorter line and capped symmetric padding fit their complete paint inside
1263
+ the host body line without introducing a second row rhythm. */
1264
+ --bf-nested-auxiliary-line-height: max(var(--bf-body-font-size), calc(var(--bf-body-line-height) - var(--bf-baseline)));
1265
+ --bf-nested-auxiliary-padding-block: min(var(--bf-single-line-row-padding-block), max(0rem, calc((var(--bf-body-line-height) - var(--bf-nested-auxiliary-line-height)) / 2)));
1258
1266
  --bf-slider-track-size: calc(var(--bf-baseline) * 0.25);
1259
- --bf-slider-row-block-size: max(var(--bf-control-box-size-compact), calc(var(--bf-body-nudge-start, 0.0775rem) + var(--bf-body-line-height, 1.25rem) + var(--bf-body-nudge-end)));
1267
+ --bf-slider-row-block-size: var(--bf-single-line-row-block-size);
1260
1268
  --bf-slider-track-offset: calc(var(--bf-body-nudge-start, 0.0775rem) + ((var(--bf-body-line-height, 1.25rem) - var(--bf-slider-track-size)) / 2));
1261
1269
  --bf-table-row-border-size: var(--bf-border-width);
1262
- --bf-table-row-padding-block-start: var(--bf-body-nudge-start, 0.0775rem);
1263
- --bf-table-row-content-size: calc(var(--bf-body-line-height, 1.25rem) + (var(--bf-table-row-padding-block-start) * 2) + var(--bf-table-row-border-size));
1264
- --bf-table-row-block-size: calc(var(--bf-table-row-content-size) + mod(calc(var(--bf-baseline) - mod(var(--bf-table-row-content-size), var(--bf-baseline))), var(--bf-baseline)));
1270
+ --bf-table-row-padding-block-start: var(--bf-single-line-row-in-box-padding-block-start);
1271
+ --bf-table-row-block-size: var(--bf-single-line-row-block-size);
1265
1272
  --bf-table-row-padding-block-end: max(0rem, calc(var(--bf-table-row-block-size) - var(--bf-body-line-height, 1.25rem) - var(--bf-table-row-padding-block-start) - var(--bf-table-row-border-size)));
1266
1273
  --bf-table-row-line-height: var(--bf-body-line-height, 1.25rem);
1267
1274
  --bf-switch-track-offset: var(--bf-single-line-row-visual-offset);
@@ -1311,7 +1318,8 @@ html.u-baseline-grid::after {
1311
1318
  --bf-top-navigation-logo-tag-gap: 0.25rem;
1312
1319
  --bf-top-navigation-logo-icon-bottom-offset: 0.375rem;
1313
1320
  --bf-top-navigation-logo-icon-optical-offset-inline: -0.0125rem;
1314
- --bf-navigation-brand-title-optical-offset-block: 0rem;
1321
+ --bf-navigation-brand-line-center-block: calc(var(--bf-top-navigation-logo-tag-block-size) - var(--bf-top-navigation-logo-icon-bottom-offset) - (var(--bf-top-navigation-logo-icon-size) / 2));
1322
+ --bf-navigation-brand-block-size: calc(var(--bf-navigation-brand-line-center-block) * 2);
1315
1323
  --bf-icon-size-default: 1rem;
1316
1324
  --bf-icon-size-medium: 2.5rem;
1317
1325
  --bf-icon-size-large: 4rem;
@@ -1321,6 +1329,7 @@ html.u-baseline-grid::after {
1321
1329
  --bf-leading-icon-gap: var(--bf-leading-mark-gap);
1322
1330
  --bf-leading-icon-offset: var(--bf-single-line-row-visual-offset);
1323
1331
  --bf-ui-chip-padding-inline: var(--bf-component-inline-inset-field);
1332
+ --bf-ui-chip-radius: 999rem;
1324
1333
  --bf-ui-badge-padding-inline: calc(var(--bf-body-line-height, 1.25rem) * 0.25);
1325
1334
  --bf-ui-badge-overhang: calc(var(--bf-ui-badge-padding-inline) * -0.75);
1326
1335
  --bf-grid-max-inline-size: var(--bf-content-max-width);
@@ -1557,7 +1566,7 @@ html.u-baseline-grid::after {
1557
1566
  margin: 0;
1558
1567
  }
1559
1568
 
1560
- .bf-theme button {
1569
+ :where(.bf-theme) :where(button) {
1561
1570
  font: inherit;
1562
1571
  }
1563
1572
 
@@ -1686,10 +1695,33 @@ html.u-baseline-grid::after {
1686
1695
  padding-inline: var(--bf-component-inline-inset-field);
1687
1696
  }
1688
1697
 
1689
- :where(.bf-theme) :where(input[type='color'].bf-color-input) {
1698
+ :where(.bf-theme) :where(.bf-color-control) {
1699
+ display: grid;
1700
+ grid-template-areas: "color-control";
1690
1701
  inline-size: 4rem;
1691
- min-block-size: var(--bf-control-box-size);
1692
- padding: calc(var(--bf-baseline) * 0.5);
1702
+ }
1703
+
1704
+ /* Native color inputs do not expose a body-text line box. This invisible
1705
+ metric strut gives their wrapper the same natural padding/border/margin
1706
+ construction as every textual control, including under browser zoom. */
1707
+ :where(.bf-theme) :where(.bf-color-control)::before {
1708
+ border-block: var(--bf-border-width) solid transparent;
1709
+ content: "\00a0";
1710
+ grid-area: color-control;
1711
+ line-height: var(--bf-body-line-height);
1712
+ margin-bottom: var(--bf-single-line-row-margin-block-end);
1713
+ padding-block: var(--bf-single-line-row-padding-block);
1714
+ visibility: hidden;
1715
+ }
1716
+
1717
+ :where(.bf-theme) :where(.bf-color-control) > :where(input[type='color'].bf-color-input) {
1718
+ align-self: stretch;
1719
+ block-size: auto;
1720
+ grid-area: color-control;
1721
+ inline-size: 100%;
1722
+ margin-bottom: var(--bf-single-line-row-margin-block-end);
1723
+ min-block-size: 0;
1724
+ padding: var(--bf-border-width);
1693
1725
  }
1694
1726
 
1695
1727
  :where(.bf-theme) :where(.bf-input, input[type='text'], input[type='number'], input[type='search'], input[type='password'], input[type='email'], input[type='url'], textarea, select):hover {
@@ -1730,13 +1762,12 @@ html.u-baseline-grid::after {
1730
1762
  line-height: var(--bf-body-line-height, 1.25rem);
1731
1763
  background: transparent;
1732
1764
  border: 0 solid transparent;
1733
- border-bottom: var(--bf-border-width) solid var(--bf-color-border-default);
1734
- border-top: var(--bf-border-width) solid transparent;
1765
+ box-shadow: inset 0 calc(var(--bf-border-width) * -1) 0 var(--bf-color-border-default);
1735
1766
  color: var(--bf-color-text-default);
1736
1767
  margin-bottom: calc(0rem + mod(calc(var(--bf-baseline) - mod(calc(var(--bf-body-line-height, 1.25rem) + (var(--bf-input-block-padding) * 2)), var(--bf-baseline))), var(--bf-baseline)));
1737
1768
  max-inline-size: 100%;
1738
1769
  min-inline-size: 0;
1739
- padding-block: max(0rem, calc(var(--bf-input-block-padding) - var(--bf-border-width)));
1770
+ padding-block: 0;
1740
1771
  padding-inline: 0;
1741
1772
  width: 100%;
1742
1773
  }
@@ -1754,8 +1785,8 @@ html.u-baseline-grid::after {
1754
1785
  color: var(--bf-color-text-default);
1755
1786
  cursor: pointer;
1756
1787
  margin-inline-end: var(--bf-field-gap);
1757
- min-block-size: var(--bf-control-box-size-compact);
1758
- padding-block: max(0rem, calc(var(--bf-control-block-padding-compact) - var(--bf-border-width)));
1788
+ min-block-size: 0;
1789
+ padding-block: var(--bf-single-line-row-padding-block);
1759
1790
  padding-inline: var(--bf-control-inline-padding-action-bordered);
1760
1791
  }
1761
1792
 
@@ -2115,6 +2146,15 @@ html.u-baseline-grid::after {
2115
2146
  padding: 0;
2116
2147
  }
2117
2148
 
2149
+ /* A composite slider's numeric field owns the shared occupied row. Stretching
2150
+ the track within that real sibling height avoids a second nominal-height
2151
+ calculation that can diverge when rem borders are rasterised under zoom. */
2152
+ :where(.bf-theme) :where(.bf-slider:not(.is-stacked)):not(:where(.bf-field.is-range.is-stacked) :where(.bf-slider)) > :where(input[type='range']) {
2153
+ align-self: stretch;
2154
+ block-size: auto;
2155
+ margin-block: 0;
2156
+ }
2157
+
2118
2158
  :where(.bf-theme) :where(input[type='range']):focus:not(:focus-visible) {
2119
2159
  outline: none;
2120
2160
  }
@@ -4448,10 +4488,6 @@ html.u-baseline-grid::after {
4448
4488
  inline-size: 100%;
4449
4489
  }
4450
4490
 
4451
- :where(.bf-theme) :where(.bf-panel-header.is-navigation-brand) :where(.bf-top-navigation-logo-title) {
4452
- transform: translateY(var(--bf-navigation-brand-title-optical-offset-block));
4453
- }
4454
-
4455
4491
  :where(.bf-theme) :where(.bf-panel-header) > :where(.bf-panel-title) {
4456
4492
  min-inline-size: 0;
4457
4493
  }
@@ -6068,10 +6104,6 @@ html.u-baseline-grid::after {
6068
6104
  border-block-end-color: var(--bf-color-border-low-contrast);
6069
6105
  }
6070
6106
 
6071
- :where(.bf-theme) :where(tbody tr:has(.bf-status-label) > td) {
6072
- padding-block: calc((var(--bf-baseline) - var(--bf-table-row-border-size)) / 2);
6073
- }
6074
-
6075
6107
  :where(.bf-theme) :where(tbody tr:hover td) {
6076
6108
  background: color-mix(in srgb, var(--bf-color-background-hover) 68%, transparent);
6077
6109
  }
@@ -6092,7 +6124,7 @@ html.u-baseline-grid::after {
6092
6124
  align-items: baseline;
6093
6125
  background-color: var(--bf-ui-chip-background);
6094
6126
  border: var(--bf-border-width) solid var(--bf-ui-chip-border);
6095
- border-radius: 1rem;
6127
+ border-radius: var(--bf-ui-chip-radius);
6096
6128
  color: var(--bf-color-text-default);
6097
6129
  display: inline-flex;
6098
6130
  gap: 0;
@@ -6281,6 +6313,45 @@ html.u-baseline-grid::after {
6281
6313
  --bf-ui-status-color: var(--bf-color-button-negative-text);
6282
6314
  }
6283
6315
 
6316
+ /* Nested auxiliary surfaces fit a body-sized flex/grid host instead of
6317
+ carrying a second standalone occupied-row contract. This modifier is
6318
+ explicit so component density never changes merely because of ancestry. */
6319
+ :where(.bf-theme) :where(.bf-chip.is-nested, .bf-status-label.is-nested) {
6320
+ line-height: var(--bf-nested-auxiliary-line-height);
6321
+ margin-block: 0;
6322
+ padding-block: var(--bf-nested-auxiliary-padding-block);
6323
+ }
6324
+
6325
+ :where(.bf-theme) :where(.bf-chip.is-nested) {
6326
+ border: 0;
6327
+ box-shadow: inset 0 0 0 var(--bf-border-width) var(--bf-ui-chip-border);
6328
+ }
6329
+
6330
+ /* Chip parts normally carry the standalone body line explicitly. A compact
6331
+ chip must pass its reduced line through to those parts so a nested badge
6332
+ can fit without making the host row taller. */
6333
+ :where(.bf-theme) :where(.bf-chip.is-nested) :where(.bf-chip-lead, .bf-chip-value) {
6334
+ line-height: inherit;
6335
+ }
6336
+
6337
+ :where(.bf-theme) :where(.bf-chip.is-nested:hover) {
6338
+ box-shadow: inset 0 0 0 var(--bf-border-width) var(--bf-ui-chip-border-hover);
6339
+ }
6340
+
6341
+ :where(.bf-theme) :where(.bf-chip.is-nested:is(:active, [aria-pressed='true'], .is-selected)) {
6342
+ box-shadow: inset 0 0 0 var(--bf-border-width) var(--bf-ui-chip-border-active);
6343
+ }
6344
+
6345
+ :where(.bf-theme) :where(.bf-status-label.is-nested) {
6346
+ border-block-width: 0;
6347
+ }
6348
+
6349
+ :where(.bf-theme) :where(.bf-badge.is-nested) {
6350
+ align-self: center;
6351
+ line-height: var(--bf-nested-auxiliary-line-height);
6352
+ vertical-align: middle;
6353
+ }
6354
+
6284
6355
 
6285
6356
  :where(.bf-theme) :where(.bf-chip-dismiss, .bf-search-box-reset, .bf-search-and-filter-clear) {
6286
6357
  appearance: none;
@@ -6725,6 +6796,7 @@ html.u-baseline-grid::after {
6725
6796
  --bf-side-navigation-disclosure-inset: max(0rem, calc(var(--bf-component-inline-inset-continuation) - var(--bf-disclosure-icon-inline-size) - var(--bf-disclosure-gap)));
6726
6797
  --bf-side-navigation-depth-step: var(--bf-space-2);
6727
6798
  --bf-side-navigation-group-gap: 1.5rem;
6799
+ --bf-side-navigation-heading-list-gap: 0.5rem;
6728
6800
  color: var(--bf-color-text-inactive);
6729
6801
  display: block;
6730
6802
  inline-size: 100%;
@@ -6737,11 +6809,31 @@ html.u-baseline-grid::after {
6737
6809
  }
6738
6810
 
6739
6811
  :where(.bf-theme) :where(.bf-side-navigation-group) {
6812
+ display: grid;
6813
+ gap: var(--bf-side-navigation-heading-list-gap);
6814
+ min-inline-size: 0;
6815
+ }
6816
+
6817
+ /* Keep the divider and heading as one tight header. The group owns only the
6818
+ larger transition from that header to its list, so the compensated rule
6819
+ cannot change the heading/list phase. */
6820
+ :where(.bf-theme) :where(.bf-side-navigation-group-header) {
6740
6821
  display: grid;
6741
6822
  gap: 0rem;
6742
6823
  min-inline-size: 0;
6743
6824
  }
6744
6825
 
6826
+ :where(.bf-theme) :where(.bf-side-navigation-group-header) > hr {
6827
+ inline-size: auto;
6828
+ margin-inline: var(--bf-side-navigation-content-inset) 0;
6829
+ }
6830
+
6831
+ /* A single-line group heading occupies four baselines. min-block-size keeps
6832
+ that phase exact while still allowing a long heading to wrap and grow. */
6833
+ :where(.bf-theme) :where(.bf-side-navigation-group-header) > :where(.bf-side-navigation-heading) {
6834
+ min-block-size: calc((var(--bf-baseline) * 4) - var(--bf-body-margin-bottom));
6835
+ }
6836
+
6745
6837
  :where(.bf-theme) :where(.bf-side-navigation-drawer) {
6746
6838
  background: var(--bf-color-background-default);
6747
6839
  bottom: 0;
@@ -6870,6 +6962,7 @@ html.u-baseline-grid::after {
6870
6962
 
6871
6963
  :where(.bf-theme) :where(.bf-side-navigation-list) {
6872
6964
  display: grid;
6965
+ grid-auto-rows: var(--bf-single-line-row-block-size);
6873
6966
  list-style: none;
6874
6967
  margin: 0;
6875
6968
  padding: 0;
@@ -6888,6 +6981,7 @@ html.u-baseline-grid::after {
6888
6981
  font-weight: var(--bf-body-font-weight, 400);
6889
6982
  line-height: var(--bf-body-line-height, 1.25rem);
6890
6983
  align-items: center;
6984
+ align-self: start;
6891
6985
  background: transparent;
6892
6986
  border: 0;
6893
6987
  border-block: var(--bf-border-width) solid transparent;
@@ -7625,7 +7719,8 @@ html.u-baseline-grid::after {
7625
7719
  display: block;
7626
7720
  margin: 0;
7627
7721
  overflow: hidden;
7628
- padding-block: var(--bf-control-block-padding-compact);
7722
+ padding-block-end: var(--bf-single-line-row-in-box-padding-block-end);
7723
+ padding-block-start: var(--bf-single-line-row-in-box-padding-block-start);
7629
7724
  padding-inline: var(--bf-component-inline-inset-action);
7630
7725
  text-align: left;
7631
7726
  text-decoration: none;
@@ -8714,13 +8809,11 @@ html.u-baseline-grid::after {
8714
8809
  line-height: var(--bf-top-navigation-logo-title-line-height, var(--bf-body-line-height, 1.5));
8715
8810
  overflow: visible;
8716
8811
  overflow-wrap: anywhere;
8717
- /* The first title line and the 1rem mark share the mark's fixed centre:
8718
- * tag block-end minus the 0.375rem inset minus half the mark. Symmetric title
8719
- * padding keeps the occupied row stable across all four type-density tiers. */
8812
+ /* The first title line and the 1rem mark share the public brand-line centre.
8813
+ * The derived brand block is twice that fixed centre, so the orange tag can
8814
+ * extend upward without changing the title or adjacent-header baseline. */
8720
8815
  padding-block: calc(
8721
- var(--bf-top-navigation-logo-tag-block-size)
8722
- - var(--bf-top-navigation-logo-icon-bottom-offset)
8723
- - (var(--bf-top-navigation-logo-icon-size) / 2)
8816
+ var(--bf-navigation-brand-line-center-block)
8724
8817
  - (var(--bf-top-navigation-logo-title-line-height, var(--bf-body-line-height, 1.5rem)) / 2)
8725
8818
  );
8726
8819
  text-overflow: clip;
@@ -9737,6 +9830,13 @@ html.u-baseline-grid::after {
9737
9830
  line-height: var(--bf-body-line-height);
9738
9831
  }
9739
9832
 
9833
+ /* Preserve the public nested fit after the preset's general typography pass.
9834
+ The modifier remains explicit and zero-specificity in every app scope. */
9835
+ :where(.bf-theme) :where(.bf-status-label.is-nested, .bf-chip.is-nested),
9836
+ :where(.bf-theme.bf-tier-app) :where(.bf-status-label.is-nested, .bf-chip.is-nested) {
9837
+ line-height: var(--bf-nested-auxiliary-line-height);
9838
+ }
9839
+
9740
9840
  :where(.bf-theme) :where(.bf-input, .bf-button, .bf-button.is-base),
9741
9841
  :where(.bf-theme.bf-tier-app) :where(.bf-input, .bf-button, .bf-button.is-base) {
9742
9842
  font-family: inherit;