Migration: CSS Custom Property Renames
Upgrading from 0.7.x? Several HDS CSS custom properties were renamed or removed in this release. If you reference any --hds-* properties directly in your own stylesheets, the renames below fail silently (your var() resolves to nothing or a fallback), so it's worth a find-and-replace before upgrading. Sass consumers should also skim the Focus Ring and Typography sections; those break at compile time, which is loud and easy to fix.
Color
--hds-palette-error-border→--hds-palette-error-indicator
Border width (component-first naming)
--hds-border-width-{accordion, button, card, input-tile, input-select, input-state, pagination, summary, table}→--hds-{component}-border-width
Border width scale (removed)
--hds-border-size-1px→--hds-border-width-thin--hds-border-size-2px→--hds-border-width-thick--hds-border-size-{0, 05, 1, 105, 2}: no replacement (inline a literal value)
Border radius (component-first naming)
--hds-border-radius-{button, card, checkbox, input-tile, modal, pagination, summary}→--hds-{component}-border-radius
Border radius scale (removed)
--hds-border-radius-0→--hds-border-radius--hds-border-radius-sm→--hds-border-radius-control--hds-border-radius-{md, lg, xl}: no replacement--hds-border-radius-pill: no replacement (use a literal value or define your own in@layer site)
Line height
--hds-line-height-{body, heading, …}→--hds-line-height-1through--hds-line-height-6(USWDS scale numbering)
Minor Changes (inc. breaking changes for pre-v1.0)
-
72384f3: Border width token refactor
New:
$hds-border-width-thin(1px) and$hds-border-width-thick(2px). Role-based Sass variables that feed USWDS theme settings directly and emit--hds-border-width-thin/--hds-border-width-thickCSS custom properties for consumers without a Sass pipeline. Added totokens.jsonasborder.width.thin/border.width.thick.Breaking:
$hds-border-sizesmap and--hds-border-size-*CSS properties removed. The value-named USWDS-style scale was never used by HDS components. Migrate:--hds-border-size-1px→--hds-border-width-thin;--hds-border-size-2px→--hds-border-width-thick; all other entries (0,05,1,105,2) have no replacement and were USWDS mirrors not present in the HDS spec. The correspondingborder.width.*token keys intokens.jsonare replaced byborder.width.thin/border.width.thick.Breaking:
$hds-width-settingsmap removed. The per-component map only existed to feed USWDS theme settings;$hds-border-width-thin/$hds-border-width-thicknow do this directly.Breaking:
--hds-border-width-{component}renamed to--hds-{component}-border-width. All nine component CSS custom properties now follow component-first naming:Old New --hds-border-width-accordion--hds-accordion-border-width--hds-border-width-button--hds-button-border-width--hds-border-width-card--hds-card-border-width--hds-border-width-input-tile--hds-input-tile-border-width--hds-border-width-input-select--hds-input-select-border-width--hds-border-width-input-state--hds-input-state-border-width--hds-border-width-pagination--hds-pagination-border-width--hds-border-width-summary--hds-summary-border-width--hds-border-width-table--hds-table-border-width -
9fd750b: Border radius token refactor
New:
$hds-border-radius(0px) and$hds-border-radius-control(2px). Role-based Sass variables establishing HDS's two border-radius values: sharp corners for most components, subtle rounding for small interactive controls. Feed USWDS theme settings directly and emit--hds-border-radius/--hds-border-radius-controlas CSS custom properties for consumers without a Sass pipeline. Added totokens.jsonasborder.radius.default/border.radius.control.Breaking:
$hds-border-radiimap and--hds-border-radius-*scale removed. The value-named USWDS-style scale was never used by HDS components. Migrate:--hds-border-radius-0→--hds-border-radius;--hds-border-radius-sm(2px) →--hds-border-radius-control;--hds-border-radius-md,-lg,-xlhave no replacement. The corresponding scale keys intokens.jsonare replaced byborder.radius.default/border.radius.control.Breaking:
$hds-radius-settingsmap removed. The per-component map only existed to feed USWDS theme settings;$hds-border-radius/$hds-border-radius-controlnow do this directly.Breaking:
--hds-border-radius-{component}renamed to--hds-{component}-border-radius. All seven component CSS custom properties now follow component-first naming:Old New --hds-border-radius-button--hds-button-border-radius--hds-border-radius-card--hds-card-border-radius--hds-border-radius-checkbox--hds-checkbox-border-radius--hds-border-radius-input-tile--hds-input-tile-border-radius--hds-border-radius-modal--hds-modal-border-radius--hds-border-radius-pagination--hds-pagination-border-radius--hds-border-radius-summary--hds-summary-border-radius -
bd9dae6: Typography + content-styling subsystem
Introduces a unified type ramp and a single-source content-styling engine, with a deliberately small public Sass surface ahead of v1.0.
Added: New public file
_hds-typography.scss:- Public mixins:
hds-type($style)(17-entry ramp) andhds-type-classes(utility-class emitter). These are the only public type symbols. - New CSS classes:
.hds-h1–.hds-h6,.hds-display-2xl,.hds-display-xl,.hds-stat-lg/md/sm/xs, plus.hds-prose-measure(from_prose.scss). - New custom properties:
--hds-letter-spacing-*(11 keys),--hds-line-height-1through--hds-line-height-6(USWDS line-height scale numbering; replaces the USWDS-derived--hds-line-height-body/heading/…names), and--hds-palette-code(NASA Blue Shade on light palettes, NASA Blue Tint on dark, White on the blue palette: a Figma-matched accent, with per-palette values chosen so code reads as text at AA 4.5:1 rather than the 3:1 decorative-stroke threshold).
Added: New
.hds-global-stylesopt-in scope. Adopters can opt a subtree into HDS bare-element content styling viaclass="hds-global-styles", withclass="hds-global-styles-reset"carving out unstyled islands (CSS@scope+all: revert-layer). The same reset class is honored inside.usa-prose, so a single carve-out mechanism works across both opt-in scopes.Added: New Prose component (
components/_prose.scss) that styles.usa-prosewith the same content-styling engine.Fixed: Component line-heights updated throughout. List items, table headers/captions, breadcrumbs, and blockquote attributions now emit the raw HDS scale instead of USWDS's rounded
lh(), tightening their line-height by ~0.05. Every content-layer line-height now traces to the raw--hds-line-height-*scale (no USWDS per-familylh()/line-height()normalization); bespoke fluid sizes use the internalfluid-size()helper (no hand-expandedclamp()literals);figcaptionroutes throughhds-type('caption')so it matches.hds-caption.Removed: Intentional pre-v1.0 public-surface reductions. No adopter is expected to depend on these; content styling is delivered via
.hds-global-styles/.usa-prose/ the global content flag, not by calling mixins:- Removed mixins:
hds-overline-label,intro-text(single consumers inlined tohds-type());hds-metadata-type(demoted to internalmetadata-type);hds-content-rules(moved tobase/_content-rules.scssand demoted to internalcontent-rules). - Removed variables:
$hds-type-fluid-min-vw,$hds-type-fluid-max-vw(now private$_fluid-min-vw/$_fluid-max-vw, set to the mobile→desktop-lg range 320→1200px);$hds-line-height-scalemap (flattened to scalar$hds-line-height-1through$hds-line-height-6);$hds-type-scale(dead code). - Deleted file:
components/_text-styles.scss(superseded byhds-type-classes+_prose.scss).
- Public mixins:
-
8354f2f: Focus ring system: breaking changes
Breaking:
hds-focus-ringsignature changed. The$width,$method, and$offsetparameters have been removed. New signature:hds-focus-ring($color, $shape, $pseudo, $circle-size-px). Update any call sites that passed non-default parameters.Breaking:
hds-focus-ringandhds-focus-ring-sizedefault$pseudoflipped from'after'to'before'. If you were calling either mixin without an explicit$pseudoargument, the focus ring now renders on::before. Pass$pseudo: 'after'to restore the previous behavior.Breaking:
$hds-focus-widthsSass map removed. The unified ring system bakes 1px directly into the SVG mask. Inline the value at any call sites that referenced this map.Breaking:
hds-link-appearanceandhds-link-hovernow render underlines viarepeating-linear-gradientinstead oftext-decoration. If you were overridingtext-decorationon elements that receive these mixins, those overrides no longer apply. Usebackground-image: noneto suppress the underline instead. -
ad744ad: Focus ring system: new mixins
Added:
hds-focus-ring-inlinemixin for inline and multiline elements (links, unstyled buttons, breadcrumbs). Renders a four-sided dashed ring viarepeating-linear-gradientmatching the Figma2,3dash spec. Fragments correctly per line box on wrapped text.Added:
hds-focus-ring-size($circle-size-px)mixin for overriding circle ring geometry on icon button size modifiers without re-declaring the full mixin. -
6e07aea: form style updates
Added:
.usa-legend--largeand.usa-radio__label-descriptionselectors are now part of the HDS authored surface.Renamed:
--hds-palette-error-borderis now--hds-palette-error-indicator. If you were referencing this property directly, update to the new name.Removed:
--hds-border-radius-pillcustom property. Use a static value or define your own in@layer site.Removed:
.usa-file-input__targetselector (HDS override dropped). -
c6a6653: Removed dead and internal exports from public surface
Breaking:
$hds-enable-experimental-palettesremoved. This flag was defined but never used in any@ifconditional. It was a dead export. Remove it from any@use 'hds-tokens' with ($hds-enable-experimental-palettes: ...)block.Breaking:
$hds-extended-paletteSass map removed. Made decision to not wire this up to$global-color-palettesvia USWDS theme settings, as direct use of $hds-color-_ or --hds-color-_ is a better DX for consumers who may not import USWDS utilities.Breaking:
$hds-color-table-{sorted-bg,sorted-stripe-bg,sorted-bg-dark,sorted-stripe-bg-dark,border-light,border-dark}removed from public Sass surface. These six table-specific color variables were only ever used internally by HDS components (_table.scss,_elements.scss). They are now internal implementation details. Remove any direct external references.
Patch Changes
-
ad744ad: Focus ring system: bug fixes
Fixed: SVG mask edges no longer clip on block focus rings.
overflow="visible"added to rect and circle SVGs.Fixed: Breadcrumb focus ring no longer clips at list edges. USWDS sets
overflow: hiddenon.usa-breadcrumb__listfor truncation; HDS Core now overrides tooverflow: visiblewhile preserving truncation behavior.Fixed: Stock
<button>anda.buttonnow match.usa-buttonfor hover, active, and focus states via a shared internal mixin. Previously diverged with a 2px solid outline andfilter: brightness()hover.Fixed: Focused links and unstyled buttons no longer show a text underline on
:focus-visible. The focus ring's bottom edge serves as the underline indicator. -
b7b2308: primary arrow button + external link fixes
Fixed:
.hds-btn--primary.usa-link--externalrendered with a clipped red circle because.usa-link--external::after's basemask-imagewas leaking through the shared pseudo-element slot. The external override now explicitly setsmask-image: none.Fixed:
.hds-btn--primarysize variants (--lg,--xl,--2xl) now scale the gap between text and circle (4px → 8px at lg+) to match the Figma reference instead of staying pinned at 4px.Fixed: External diagonal glyph appeared smaller than the internal right-facing glyph at matching sizes. Both inline SVGs now use the HDS filled-icon paths (
arrow-line-right,arrow-line-diagonal) so their drawn extents match.Fixed:
.usa-link--external::afterresetmargin-top: 0.7exleaked from USWDS'sexternal-link()mixin, shifting the arrow off the text baseline. The base rule now setsmargin: 0.Fixed:
.hds-btn--primaryfocus ring switched fromhds-focus-ring-inlinetohds-focus-ringwith per-sizeinsetoverrides matching Figma spacing (4px top/bottom, 6px left/right on default/sm/xs; 6px all sides on lg/xl; 6px top/bottom, 8px left/right on 2xl).