@import './theme.css'; .react-aria-ProgressList { display: flex; max-width: 100%; margin: 0; padding: 0; list-style: none; font: var(--font-size) system-ui; color: var(--text-color); } .react-aria-ProgressListItem { /* Steps share the available width equally, with a preferred width of 96px. */ flex: 1; width: calc(var(--spacing) * 24); &[data-current] .marker, &[data-completed] .marker { background: var(--highlight-background); border-color: var(--highlight-background); color: var(--highlight-foreground); forced-color-adjust: none; } &[data-current] { font-weight: 600; } &:first-child .react-aria-ProgressListItemContent::before, &:last-child .react-aria-ProgressListItemContent::after { display: none; } /* Highlight the line between two steps that are both completed or current. */ &:is([data-current], [data-completed]) { &:has(+ :is([data-current], [data-completed])) .react-aria-ProgressListItemContent::after, & + :is([data-current], [data-completed]) .react-aria-ProgressListItemContent::before { border-color: var(--highlight-background); } } } .react-aria-ProgressListItemContent { /* The marker sits between two connector lines, with the label below. */ display: grid; grid-template-columns: 1fr auto 1fr; grid-template-areas: 'before marker after' 'label label label'; align-items: center; gap: var(--spacing-2); text-align: center; .marker { grid-area: marker; display: flex; align-items: center; justify-content: center; width: var(--spacing-6); height: var(--spacing-6); box-sizing: border-box; border: 1px solid var(--border-color); border-radius: 50%; font-size: var(--font-size-sm); } .label { grid-area: label; padding-inline: var(--spacing-1); } /* Connector lines. Each step draws its half of the line to each neighbor, so the lines connect the markers even when steps have different widths. */ &::before, &::after { content: ''; border-top: 1px solid var(--border-color); } &::before { grid-area: before; } &::after { grid-area: after; } }