Repository navigation
fix(theme): the stock theme's dark-mode accent is darker, so white button text meets 4.5:1 - #9818
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
--color-on-accent is the label on every --color-accent fill, such as a primary Button's, so both halves of the stock pair must meet WCAG 1.4.3. Red today: the dark half is white on #2694FE, 3.11:1.
618348a to
50b3fd7
Compare
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| lab/Comments | 265.3 kB (+13 B) · 2.5 kB CSS (0) | — | — · — · — |
| MetadataList | 16.7 kB (−1 B) · 3.8 kB CSS (+9 B) | — | — · — · — |
| DateRangeInput · Storybook | 71.4 kB (+2 B) · 11.2 kB CSS (+3 B) | 666 (0) | — · — · — |
194 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| LayerProvider | 63.4 kB (+2 B) · 9.4 kB CSS (+3 B) | — | — · — · — |
| Markdown | 146.1 kB (+2 B) · 18.8 kB CSS (+3 B) | — | — · — · — |
| MultiSelector | 73.1 kB (+2 B) · 15.4 kB CSS (+3 B) | — | — · — · — |
| Tab | 11.7 kB (0) · 4.2 kB CSS (+5 B) | — | — · — · — |
| Toast | 59.7 kB (+2 B) · 9.0 kB CSS (+3 B) | — | — · — · — |
| AvatarGroup | 37.5 kB (0) · 5.5 kB CSS (+4 B) | — | — · — · — |
| AvatarStatusDot | 7.2 kB (0) · 3.6 kB CSS (+4 B) | — | — · — · — |
| Badge | 4.0 kB (0) · 4.0 kB CSS (+4 B) | — | — · — · — |
| Blockquote | 3.6 kB (0) · 3.5 kB CSS (+4 B) | — | — · — · — |
| BottomSheetSwitcher | 17.2 kB (0) · 3.4 kB CSS (+4 B) | — | — · — · — |
| Breadcrumbs | 16.0 kB (0) · 3.4 kB CSS (+4 B) | — | — · — · — |
| ButtonGroup | 9.0 kB (0) · 3.4 kB CSS (+4 B) | — | — · — · — |
| ChatMessage | 16.7 kB (0) · 3.7 kB CSS (+4 B) | — | — · — · — |
| ChatMessageBubble | 7.1 kB (0) · 3.8 kB CSS (+4 B) | — | — · — · — |
| ClickableCard | 15.0 kB (0) · 7.0 kB CSS (+4 B) | — | — · — · — |
| Code | 3.6 kB (0) · 3.5 kB CSS (+4 B) | — | — · — · — |
| CommandPaletteFooter | 17.0 kB (0) · 3.7 kB CSS (+4 B) | — | — · — · — |
| CommandPaletteGroup | 3.5 kB (0) · 3.5 kB CSS (+4 B) | — | — · — · — |
| CommandPaletteItem | 10.4 kB (0) · 3.6 kB CSS (+4 B) | — | — · — · — |
| DateInput | 152.0 kB (+2 B) · 15.5 kB CSS (+2 B) | — | — · — · — |
| DropdownMenuGroup | 6.2 kB (0) · 3.4 kB CSS (+4 B) | — | — · — · — |
| FieldLabel | 38.0 kB (0) · 5.4 kB CSS (+4 B) | — | — · — · — |
| Grid | 4.4 kB (0) · 3.8 kB CSS (+4 B) | — | — · — · — |
| Item | 14.1 kB (0) · 5.2 kB CSS (+4 B) | — | — · — · — |
| Kbd | 16.7 kB (0) · 3.6 kB CSS (+4 B) | — | — · — · — |
| NavHeadingMenu | 15.3 kB (0) · 3.5 kB CSS (+4 B) | — | — · — · — |
| NavIcon | 3.5 kB (0) · 3.4 kB CSS (+4 B) | — | — · — · — |
| Overlay | 21.1 kB (+1 B) · 4.0 kB CSS (+3 B) | — | — · — · — |
| ResizeHandle | 19.5 kB (0) · 4.3 kB CSS (+4 B) | — | — · — · — |
| SegmentedControlItem | 10.7 kB (0) · 4.0 kB CSS (+4 B) | — | — · — · — |
| SideNavSection | 6.6 kB (0) · 3.8 kB CSS (+4 B) | — | — · — · — |
| StatusDot | 22.9 kB (0) · 5.2 kB CSS (+4 B) | — | — · — · — |
| Step | 28.3 kB (0) · 5.6 kB CSS (+4 B) | — | — · — · — |
| TableBody | 3.4 kB (0) · 3.3 kB CSS (+4 B) | — | — · — · — |
| TableFooter | 3.4 kB (0) · 3.3 kB CSS (+4 B) | — | — · — · — |
| TableHeader | 3.4 kB (0) · 3.3 kB CSS (+4 B) | — | — · — · — |
| TableRow | 6.5 kB (0) · 4.0 kB CSS (+4 B) | — | — · — · — |
| Timer | 9.5 kB (0) · 5.9 kB CSS (+4 B) | — | — · — · — |
| TopNav | 56.0 kB (0) · 9.7 kB CSS (+4 B) | — | — · — · — |
| TreeList | 39.4 kB (0) · 5.3 kB CSS (+4 B) | — | — · — · — |
| lab/CommentThread | 260.0 kB (+4 B) · 2.4 kB CSS (0) | — | — · — · — |
| AlertDialog | 86.8 kB (0) · 13.1 kB CSS (+3 B) | — | — · — · — |
| AppShell | 73.3 kB (0) · 12.2 kB CSS (+3 B) | — | — · — · — |
| AspectRatio | 3.8 kB (0) · 3.6 kB CSS (+3 B) | — | — · — · — |
| Avatar | 34.8 kB (0) · 5.4 kB CSS (+3 B) | — | — · — · — |
| AvatarGroupOverflow | 38.9 kB (0) · 5.5 kB CSS (+3 B) | — | — · — · — |
| Banner | 47.3 kB (0) · 9.2 kB CSS (+3 B) | — | — · — · — |
| BaseTypeahead | 55.4 kB (0) · 9.7 kB CSS (+3 B) | — | — · — · — |
| BreadcrumbItem | 69.4 kB (0) · 11.3 kB CSS (+3 B) | — | — · — · — |
| Button | 45.3 kB (0) · 8.7 kB CSS (+3 B) | — | — · — · — |
| Calendar | 54.5 kB (0) · 9.3 kB CSS (+3 B) | — | — · — · — |
| Card | 6.5 kB (0) · 6.4 kB CSS (+3 B) | — | — · — · — |
| Center | 4.2 kB (0) · 4.6 kB CSS (+3 B) | — | — · — · — |
| ChatComposer | 61.6 kB (0) · 10.6 kB CSS (+3 B) | — | — · — · — |
| ChatComposerDrawer | 17.5 kB (0) · 4.7 kB CSS (+3 B) | — | — · — · — |
| ChatComposerInput | 59.5 kB (0) · 10.0 kB CSS (+3 B) | — | — · — · — |
| ChatComposerTokenElement | 59.5 kB (0) · 10.0 kB CSS (+3 B) | — | — · — · — |
| ChatDictationButton | 45.9 kB (0) · 8.8 kB CSS (+3 B) | — | — · — · — |
| ChatLayout | 48.5 kB (0) · 9.3 kB CSS (+3 B) | — | — · — · — |
| ChatLayoutScrollButton | 45.8 kB (0) · 8.9 kB CSS (+3 B) | — | — · — · — |
| ChatMessageList | 22.8 kB (0) · 6.9 kB CSS (+3 B) | — | — · — · — |
| ChatMessageMetadata | 19.8 kB (0) · 4.2 kB CSS (+3 B) | — | — · — · — |
| ChatSystemMessage | 6.8 kB (0) · 3.8 kB CSS (+3 B) | — | — · — · — |
| ChatTokenizedText | 7.1 kB (0) · 4.0 kB CSS (+3 B) | — | — · — · — |
| ChatToolCalls | 25.9 kB (0) · 8.2 kB CSS (+3 B) | — | — · — · — |
| CheckboxInput | 48.7 kB (0) · 8.7 kB CSS (+3 B) | — | — · — · — |
| CheckboxListItem | 54.1 kB (0) · 10.4 kB CSS (+3 B) | — | — · — · — |
| Citation | 20.1 kB (0) · 4.5 kB CSS (+3 B) | — | — · — · — |
| CodeBlock | 59.2 kB (0) · 10.0 kB CSS (+3 B) | — | — · — · — |
| Collapsible | 23.4 kB (0) · 4.5 kB CSS (+3 B) | — | — · — · — |
| CollapsibleGroup | 6.5 kB (0) · 3.3 kB CSS (+3 B) | — | — · — · — |
| CommandPaletteEmpty | 6.2 kB (0) · 3.5 kB CSS (+3 B) | — | — · — · — |
| CommandPaletteInput | 26.9 kB (0) · 7.4 kB CSS (+3 B) | — | — · — · — |
| CommandPaletteList | 16.0 kB (0) · 3.4 kB CSS (+3 B) | — | — · — · — |
| ComplexSelector | 55.8 kB (0) · 10.5 kB CSS (+3 B) | — | — · — · — |
| ContextMenu | 75.4 kB (0) · 15.9 kB CSS (+3 B) | — | — · — · — |
| ContextMenuItem | 20.9 kB (0) · 6.0 kB CSS (+3 B) | — | — · — · — |
| DialogHeader | 48.2 kB (0) · 10.2 kB CSS (+3 B) | — | — · — · — |
| Drawer | 40.5 kB (0) · 8.2 kB CSS (+3 B) | — | — · — · — |
| DrawerHeader | 48.4 kB (0) · 11.6 kB CSS (+3 B) | — | — · — · — |
| DropdownMenu | 74.1 kB (0) · 16.0 kB CSS (+3 B) | — | — · — · — |
| DropdownMenuCheckboxItem | 19.2 kB (0) · 6.4 kB CSS (+3 B) | — | — · — · — |
| DropdownMenuItem | 18.4 kB (0) · 6.0 kB CSS (+3 B) | — | — · — · — |
| DropdownMenuRadioGroup | 6.1 kB (0) · 3.4 kB CSS (+3 B) | — | — · — · — |
| DropdownMenuRadioItem | 19.2 kB (0) · 6.4 kB CSS (+3 B) | — | — · — · — |
| DropdownMenuSubMenu | 57.9 kB (0) · 9.3 kB CSS (+3 B) | — | — · — · — |
| Field | 41.9 kB (0) · 6.9 kB CSS (+3 B) | — | — · — · — |
| FieldStatus | 9.6 kB (0) · 3.6 kB CSS (+3 B) | — | — · — · — |
| FileInput | 53.8 kB (0) · 9.7 kB CSS (+3 B) | — | — · — · — |
| FormLayout | 6.4 kB (0) · 3.5 kB CSS (+3 B) | — | — · — · — |
| GridSpan | 3.5 kB (0) · 3.4 kB CSS (+3 B) | — | — · — · — |
| Heading | 7.9 kB (0) · 4.9 kB CSS (+3 B) | — | — · — · — |
| HoverCard | 19.3 kB (0) · 3.9 kB CSS (+3 B) | — | — · — · — |
| IconButton | 45.4 kB (0) · 8.7 kB CSS (+3 B) | — | — · — · — |
| InfoTip | 37.2 kB (0) · 5.0 kB CSS (+3 B) | — | — · — · — |
| InputGroup | 43.0 kB (0) · 7.3 kB CSS (+3 B) | — | — · — · — |
| Lightbox | 52.6 kB (0) · 9.1 kB CSS (+3 B) | — | — · — · — |
| Link | 42.8 kB (0) · 6.9 kB CSS (+3 B) | — | — · — · — |
| ListItem | 53.4 kB (0) · 10.4 kB CSS (+3 B) | — | — · — · — |
| MetadataListItem | 6.6 kB (0) · 3.5 kB CSS (+3 B) | — | — · — · — |
| MobileNav | 54.4 kB (0) · 9.3 kB CSS (+3 B) | — | — · — · — |
| MobileNavToggle | 45.7 kB (0) · 8.7 kB CSS (+3 B) | — | — · — · — |
| MoreMenu | 74.3 kB (0) · 16.0 kB CSS (+3 B) | — | — · — · — |
| NumberInput | 55.1 kB (0) · 10.2 kB CSS (+3 B) | — | — · — · — |
| Outline | 22.2 kB (0) · 4.2 kB CSS (+3 B) | — | — · — · — |
| OverflowList | 8.6 kB (0) · 3.7 kB CSS (+3 B) | — | — · — · — |
| Pagination | 87.9 kB (0) · 16.5 kB CSS (+3 B) | — | — · — · — |
| ProgressBar | 10.8 kB (0) · 6.2 kB CSS (+3 B) | — | — · — · — |
| RadioList | 43.4 kB (0) · 6.9 kB CSS (+3 B) | — | — · — · — |
| ScrollableArea | 10.7 kB (0) · 4.3 kB CSS (+3 B) | — | — · — · — |
| Section | 7.6 kB (0) · 6.3 kB CSS (+3 B) | — | — · — · — |
| SegmentedControl | 82.9 kB (0) · 6.7 kB CSS (+3 B) | — | — · — · — |
| SelectableCard | 15.2 kB (0) · 7.2 kB CSS (+3 B) | — | — · — · — |
| Selector | 79.2 kB (0) · 16.2 kB CSS (+3 B) | — | — · — · — |
| SelectorOption | 17.4 kB (0) · 5.8 kB CSS (+3 B) | — | — · — · — |
| SideNav | 73.7 kB (0) · 10.1 kB CSS (+3 B) | — | — · — · — |
| SideNavHeading | 59.9 kB (0) · 10.0 kB CSS (+3 B) | — | — · — · — |
| SideNavItem | 54.9 kB (0) · 9.8 kB CSS (+3 B) | — | — · — · — |
| Skeleton | 3.8 kB (0) · 3.8 kB CSS (+3 B) | — | — · — · — |
| Slider | 91.0 kB (0) · 8.3 kB CSS (+3 B) | — | — · — · — |
| Spinner | 18.5 kB (0) · 5.7 kB CSS (+3 B) | — | — · — · — |
| Stepper | 46.9 kB (0) · 8.9 kB CSS (+3 B) | — | — · — · — |
| Switch | 88.3 kB (0) · 9.5 kB CSS (+3 B) | — | — · — · — |
| TableCell | 76.6 kB (0) · 16.4 kB CSS (+3 B) | — | — · — · — |
| TableHeaderCell | 76.2 kB (0) · 16.1 kB CSS (+3 B) | — | — · — · — |
| TabList | 35.5 kB (0) · 6.4 kB CSS (+3 B) | — | — · — · — |
| TabMenu | 56.6 kB (0) · 9.9 kB CSS (+3 B) | — | — · — · — |
| Text | 7.4 kB (0) · 4.9 kB CSS (+3 B) | — | — · — · — |
| TextArea | 48.2 kB (0) · 8.8 kB CSS (+3 B) | — | — · — · — |
| TextInput | 53.0 kB (0) · 9.9 kB CSS (+3 B) | — | — · — · — |
| Thumbnail | 49.7 kB (0) · 10.3 kB CSS (+3 B) | — | — · — · — |
| TimeInput | 138.2 kB (0) · 14.5 kB CSS (+3 B) | — | — · — · — |
| Timestamp | 21.3 kB (0) · 8.9 kB CSS (+3 B) | — | — · — · — |
| ToggleButton | 46.2 kB (0) · 8.8 kB CSS (+3 B) | — | — · — · — |
| ToggleButtonGroup | 6.4 kB (0) · 3.4 kB CSS (+3 B) | — | — · — · — |
| Token | 25.7 kB (0) · 4.8 kB CSS (+3 B) | — | — · — · — |
| Tokenizer | 70.0 kB (0) · 17.2 kB CSS (+3 B) | — | — · — · — |
| Toolbar | 34.8 kB (0) · 7.9 kB CSS (+3 B) | — | — · — · — |
| Tooltip | 20.6 kB (0) · 3.9 kB CSS (+3 B) | — | — · — · — |
| TopNavHeading | 59.3 kB (0) · 9.8 kB CSS (+3 B) | — | — · — · — |
| TopNavItem | 11.0 kB (0) · 4.0 kB CSS (+3 B) | — | — · — · — |
| TopNavMegaMenu | 54.4 kB (0) · 10.6 kB CSS (+3 B) | — | — · — · — |
| TopNavMegaMenuFeaturedCard | 6.9 kB (0) · 3.6 kB CSS (+3 B) | — | — · — · — |
| TopNavMegaMenuItem | 11.1 kB (0) · 4.2 kB CSS (+3 B) | — | — · — · — |
| TypeaheadItem | 6.3 kB (0) · 3.6 kB CSS (+3 B) | — | — · — · — |
| charts/Chart | 160.3 kB (+2 B) · 494 B CSS (0) | — | — · — · — |
| BottomSheet | 55.1 kB (0) · 7.5 kB CSS (+2 B) | — | — · — · — |
| Carousel | 49.7 kB (−1 B) · 9.5 kB CSS (+3 B) | — | — · — · — |
| ChatSendButton | 45.8 kB (0) · 8.7 kB CSS (+2 B) | — | — · — · — |
| CheckboxList | 44.6 kB (0) · 7.5 kB CSS (+2 B) | — | — · — · — |
| DateTimeInput | 174.1 kB (−1 B) · 17.2 kB CSS (+3 B) | — | — · — · — |
| Dialog | 21.3 kB (0) · 6.7 kB CSS (+2 B) | — | — · — · — |
| InputGroupText | 6.4 kB (0) · 3.9 kB CSS (+2 B) | — | — · — · — |
| LayoutPanel | 7.6 kB (0) · 4.9 kB CSS (+2 B) | — | — · — · — |
| Popover | 52.1 kB (0) · 12.8 kB CSS (+2 B) | — | — · — · — |
| RadioListItem | 51.9 kB (0) · 9.4 kB CSS (+2 B) | — | — · — · — |
| SideNavCollapseButton | 46.2 kB (0) · 8.8 kB CSS (+2 B) | — | — · — · — |
| Table | 84.8 kB (0) · 16.6 kB CSS (+2 B) | — | — · — · — |
| TableSelectionToolbar | 54.9 kB (0) · 11.8 kB CSS (+2 B) | — | — · — · — |
| TopNavMenu | 59.2 kB (0) · 9.9 kB CSS (+2 B) | — | — · — · — |
| Typeahead | 63.2 kB (0) · 11.2 kB CSS (+2 B) | — | — · — · — |
| lab/TourStep | 58.0 kB (+2 B) · 590 B CSS (0) | — | — · — · — |
| CommandPalette | 53.5 kB (0) · 12.3 kB CSS (+1 B) | — | — · — · — |
| PowerSearch | 244.8 kB (−2 B) · 22.2 kB CSS (+3 B) | — | — · — · — |
| lab/ChatReactionBar | 66.5 kB (+1 B) · 1.1 kB CSS (0) | — | — · — · — |
| charts/ChartAxis | 6.7 kB (0) · 112 B CSS (0) | — | — · — · — |
| charts/ChartLegend | 34.4 kB (0) · 224 B CSS (0) | — | — · — · — |
| charts/ChartTooltip | 136.9 kB (0) · 423 B CSS (0) | — | — · — · — |
| lab/ChartDotGL | 7.4 kB (0) · 20 B CSS (0) | — | — · — · — |
| lab/ChartDotGLInteractive | 8.3 kB (0) · 20 B CSS (0) | — | — · — · — |
| lab/ChartHeatmapGL | 8.5 kB (0) · 20 B CSS (0) | — | — · — · — |
| lab/ChartStreamGL | 7.5 kB (0) · 20 B CSS (0) | — | — · — · — |
| lab/ChatReasoning | 7.0 kB (0) · 967 B CSS (0) | — | — · — · — |
| lab/ChatTypingIndicator | 24.8 kB (0) · 612 B CSS (0) | — | — · — · — |
| lab/ChatUnreadDivider | 3.6 kB (0) · 348 B CSS (0) | — | — · — · — |
| lab/CircularProgress | 8.5 kB (0) · 1.1 kB CSS (0) | — | — · — · — |
| lab/CodeEditor | 14.0 kB (0) · 743 B CSS (0) | — | — · — · — |
| lab/CommentComposer | 104.9 kB (0) · 1.9 kB CSS (0) | — | — · — · — |
| lab/CommentPin | 47.1 kB (0) · 1.2 kB CSS (0) | — | — · — · — |
| lab/DiffViewer | 71.3 kB (0) · 2.1 kB CSS (0) | — | — · — · — |
| lab/EmojiPicker | 70.8 kB (0) · 722 B CSS (0) | — | — · — · — |
| lab/LogStream | 8.0 kB (0) · 1.6 kB CSS (0) | — | — · — · — |
| lab/Schedule | 60.6 kB (0) · 3.9 kB CSS (0) | — | — · — · — |
| lab/SelectableCardGroup | 50.4 kB (0) · 162 B CSS (0) | — | — · — · — |
| lab/Stat | 4.2 kB (0) · 646 B CSS (0) | — | — · — · — |
| lab/SVGIcon | 7.6 kB (0) · 764 B CSS (0) | — | — · — · — |
| lab/ThreeDScatterGL | 7.6 kB (0) · 20 B CSS (0) | — | — · — · — |
| lab/TransferList | 75.8 kB (0) · 1.7 kB CSS (0) | — | — · — · — |
| lab/TransferListSelector | 83.4 kB (0) · 1.9 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditor | 278.4 kB (0) · 2.6 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditorToolbar | 228.7 kB (0) · 454 B CSS (0) | — | — · — · — |
| richtext/RichTextView | 258.8 kB (0) · 2.3 kB CSS (0) | — | — · — · — |
| lab/ChatEmojiPicker | 66.0 kB (−2 B) · 773 B CSS (0) | — | — · — · — |
| lab/ListInput | 82.0 kB (−3 B) · 1.6 kB CSS (0) | — | — · — · — |
Package size:
- @astryxdesign/cli 3.35 MB packed (+2 B); no new dependencies
- @astryxdesign/core 6.42 MB packed (+23 B); no new dependencies
API changes: core +0 · ~3 · −0
Committed API report behind this build: cli 8 rows, core 4 rows; run pnpm api:report.
3 API changes (advisory)
| Package | Where | Signature | Usage | |
|---|---|---|---|---|
| ~ | core |
. · Values · const colorDefaults |
--color-accent: 'light-dark(#0064E0, #2694FE)' → --color-accent: 'light-dark(#0064E0, #0171E3)' |
import {colorDefaults} from '@astryxdesign/core' |
| ~ | core |
. · Values · const colorVars |
const colorVars: stylex.VarGroup<Readonly<{ readonly '--color-accent': "light-dark(#0064E0, #2694FE)"; readonly '--color-accent-muted': "light-dark(#0082FB33, #0082FB3F)"; reado … #a042f923 → const colorVars: stylex.VarGroup<Readonly<{ readonly '--color-accent': "light-dark(#0064E0, #0171E3)"; readonly '--color-accent-muted': "light-dark(#0082FB33, #0082FB3F)"; reado … #9de1262f |
import {colorVars} from '@astryxdesign/core' |
| ~ | core |
. · Values · const inputWrapperStyles |
const inputWrapperStyles: Readonly<{ readonly base: Readonly<{ readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">; readonly position: stylex.StyleXClassNameFor<"pos … #90a96087 → const inputWrapperStyles: Readonly<{ readonly base: Readonly<{ readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">; readonly position: stylex.StyleXClassNameFor<"pos … #ba795170 |
import {inputWrapperStyles} from '@astryxdesign/core' |
Wide change (shared styles: packages/core/src/theme/contrast.test.ts, packages/core/src/theme/expandColorScale.test.ts, packages/core/src/theme/tokens.stylex.ts): add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Approval waits on an owner decision: the guard rightly holds the stock accent pair to 4.5:1 (WCAG 1.4.3, which spec:AST-020 assigns to component and theme), but no current record says which token changes to get there in dark mode.
What needs settling: whether the dark half of --color-on-accent becomes a dark ink, as the dark half of --color-on-error already is, or the dark half of --color-accent darkens. An engineering owner (the author can, as one) records that choice on this pull request; the token commit then lands with the record clause that states the value, and an engineering owner approves that head with /approve-spec <full head SHA>.
Required change:
- Read the pair with
resolveThemeToken(null, '--color-accent', {mode})andresolveThemeToken(null, '--color-on-accent', {mode})fromtokens.ts, and deletehalves()(contrast.test.ts:98-104), which duplicates that resolver and throws if the fix writes the dark half as avar()reference.
Also, the description's light ratio should read 5.39:1 (white on #0064E0, as the guard computes), not 4.82:1.
[Automated review]
| function halves(value: string): [light: string, dark: string] { | ||
| const match = /^light-dark\(\s*([^,]+?)\s*,\s*([^)]+?)\s*\)$/.exec(value); | ||
| if (match == null) { | ||
| return [value, value]; | ||
| } | ||
| return [match[1], match[2]]; | ||
| } |
There was a problem hiding this comment.
resolveThemeToken in tokens.ts already resolves a token for one mode, following light-dark() and var(), and the repository's other contrast guard reads Core's defaults that way. This local regex returns the whole string when a half is a reference such as var(--color-text-primary), and contrastRatio then throws in both modes. Suggest dropping halves() and reading each half directly:
const accent = resolveThemeToken(null, '--color-accent', {mode});
const onAccent = resolveThemeToken(null, '--color-on-accent', {mode});with mode set to 'light' or 'dark'. On today's values it gives the same 5.39:1 and 3.11:1.
…tton text meets 4.5:1 --color-accent's dark half is #0171E3 instead of #2694FE: white on it is 4.70:1 (was 3.11:1), so the stock accent guard passes. Light mode and the dark text, icon and border accent tokens are unchanged. The CLI theme template and the generated color token docs use the same value. architecture:theme-tokens INV12 states the rule; Button's record notes the hover and pressed overlays on the dark accent stay under 4.5:1.
|
/approve-spec c82622d |
There was a problem hiding this comment.
Changes requested. The darker stock dark accent (#0171E3, approved at this head with theme-tokens INV12) fixes the primary Button label (4.70:1, was 3.11:1), but four things need fixing first:
- The darker accent pulls text that components paint in
--color-accentunder 4.5:1 in dark mode: MetadataList's "Show more" (MetadataList.tsx:161) drops from 5.28:1 to 3.50:1 on a dark card and Table's sort rank (useTableSortable.tsx:171) drops with it, so point those text styles at--color-text-accent. halves()incontrast.test.tsre-implements thelight-dark()parsing thatresolveThemeTokenalready owns, so read the pair withresolveThemeToken(null, name, {mode})and delete the helper.- The changeset says a primary Button's label meets 4.5:1 and that the dark accent text and icon colours are unchanged, but hovered and pressed labels stay near 4.36:1 and 4.03:1 and focus rings, accent icons and accent-coloured text darken, so reword it to match.
- The changeset does not say how to keep the old look, which
spec:AST-017FR3 requires for a visual default change, so add that a theme can set'--color-accent': ['#0064E0', '#2694FE'].
DateRangeInput's selected preset was already under 4.5:1 and falls to 2.31:1; --color-text-accent alone lifts it only to 3.88:1, so it needs its own fix or a tracked gap. The description still calls the token commit pending and gives light mode as 4.82:1, which is 5.39:1.
[Automated review]
| export const colorDefaults = { | ||
| // Core semantic | ||
| '--color-accent': 'light-dark(#0064E0, #2694FE)', | ||
| '--color-accent': 'light-dark(#0064E0, #0171E3)', |
There was a problem hiding this comment.
In dark mode this also darkens text that components paint in --color-accent: MetadataList's "Show more" (MetadataList.tsx:161) drops from 5.28:1 to 3.50:1 on a dark card, and Table's sort rank (useTableSortable.tsx:171) drops with it. Pointing those text styles at --color-text-accent (dark #3E9EFB, 5.86:1 on a card) keeps them readable.
| '@astryxdesign/cli': patch | ||
| --- | ||
|
|
||
| [fix] The stock theme's dark-mode accent (`--color-accent`) is now `#0171E3` instead of `#2694FE`, so white text on an accent fill, such as a primary Button's label, meets 4.5:1 (4.70:1, was 3.11:1). Light mode keeps `#0064E0`, and the dark text, icon and border accent colors are unchanged. The theme template that `astryx theme template` writes uses the same dark accent, and the generated color token docs list it. |
There was a problem hiding this comment.
Two fixes here. The label meets 4.5:1 at rest only (about 4.36:1 hovered and 4.03:1 pressed, as the Button record notes), and focus rings, accent icons and accent-coloured text do darken in dark mode. Also add the way back to the old look: a theme can set '--color-accent': ['#0064E0', '#2694FE'].
…ard reads Core's resolver MetadataList's Show more, Table's sort rank and DateRangeInput's applied preset painted text in --color-accent, so the darker dark accent pulled them under 4.5:1. They now read --color-text-accent. DateRangeInput's preset still measures 3.88:1 on its muted fill in dark mode; its record notes the gap. The stock-pair guard reads both halves through resolveThemeToken instead of parsing light-dark() itself. The changeset names what darkens, the hover and press levels, and how a theme keeps the previous accent.
|
/approve-spec fac8e73 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because a draft runs no CI; marking the pull request ready for review starts it.
The darker stock dark accent (#0171E3) lifts a primary Button's white label from 3.11:1 to 4.70:1, theme-tokens INV12 and the two implementation-gap notes carry an engineering owner's approval at this head, and the new guard fails on the base and passes here. The changes requested on the previous revision are all in: accent-coloured text now reads --color-text-accent (5.86:1 on a dark card), the guard reads through resolveThemeToken, and the changeset gives the hover and press levels and how to keep the old look.
[Automated review]
|
/approve-spec dd906cf |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because a draft runs no CI; marking the pull request ready for review starts it.
The darker stock dark accent (#0171E3) lifts a primary Button's white label from 3.11:1 to 4.70:1, theme-tokens INV12 and the two implementation-gap notes carry an engineering owner's approval for this head, and accent-coloured text now reads --color-text-accent (5.86:1 on a dark card). The regenerated Swift default theme matches Core's new dark accent, so its drift test passes.
[Automated review]
Only packages/core/api-report.md changes, as pnpm api:report writes it on main bfc1dcc: useClickableContainer's parameter spelling (meta#8085), the colorVars and inputWrapperStyles hashes after the dark-mode accent change (meta#9818), and the array spelling of visibleCalendarMonths (meta#10007).
…le (#10056) chore: regenerate the four core API report rows three merges left stale Only packages/core/api-report.md changes, as pnpm api:report writes it on main bfc1dcc: useClickableContainer's parameter spelling (#8085), the colorVars and inputWrapperStyles hashes after the dark-mode accent change (#9818), and the array spelling of visibleCalendarMonths (#10007).
User impact
In the stock theme's dark mode, every primary Button, and any other white label on an accent fill, is hard to read: white on
#2694FEis 3.11:1, under the 4.5:1 that WCAG 1.4.3 asks for normal text. People with low vision, or anyone reading in bright light, can lose the most important action on the screen. After this change the dark accent is#0171E3, and the same label reads at 4.70:1.Problem and solution fit
--color-accentis#2694FE, and--color-on-accent(the label on it) is white.architecture:theme-tokensnow states the rule as INV12: the stock accent pair meets 4.5:1 in light and dark mode.Fix: the stock theme's dark half of
--color-accentchanges from#2694FEto#0171E3. Light mode keeps#0064E0, and the--color-text-accent,--color-icon-accentand blue border tokens keep their dark values. Everything painted with--color-accentitself darkens in dark mode: accent fills, focus rings, and icons that use the accent.Follow-through: three components painted text in
--color-accent, so the darker fill colour would have pulled them under 4.5:1 in dark mode. They now read the text role,--color-text-accent, as text should (before → after):In light mode
--color-text-accentequals--color-accent(#0064E0), so light mode doesn't change.Contrast
--color-text-accent)--color-text-accent)#111112)The rest values are exact for the token pair. The hover and press values come from the painted pixels of a primary Button in real Chrome. The hover and press overlays still leave the label under 4.5:1, and Button's record states that as an implementation gap.
Evidence
Real Chrome 156, the
Core/Button/PrimaryandCore/ProgressBar/Defaultstories in dark mode with Core's own tokens (no first-party theme). Before: Storybook built frommain. After: this branch.contrast.test.ts"the stock accent pair meets 4.5:1 in the dark theme" was red onmain(3.11:1). It is green here, and so is the light case.expandColorScale.test.tspins the default accent; its dark half moves to#0171E3. A theme that sets only a neutral style inherits the new dark accent, as it inherits every Core default.Expected behavior and authority
architecture:theme-tokensINV12 (added here): "The stock accent pair meets 4.5:1:--color-on-accenton--color-accentmeets 4.5:1 in light and dark mode in Core's defaults." Its verification row names the current values and the guard.Button.spec.mdAccessibility contract: "Implementation gap: Button's hover and pressed overlays on the dark accent give its label 4.35:1 and 4.02:1, under 4.5:1."DateRangeInput.spec.mdAccessibility contract: "Implementation gap: in dark mode the applied preset's label on its muted accent fill measures 3.88:1 on the popover surface, under 4.5:1."'--color-accent': ['#0064E0', '#2694FE']. The changeset says so too.Smallest restoration
packages/core/src/theme/tokens.stylex.ts: the dark half of--color-accent.packages/cli/assets/theme.template.ts: the theme template thatastryx theme templatewrites had the same failing pair (#2694FEwith a white on-accent). It now uses#0171E3.packages/cli/assets/docs/tree/tokens-color.doc.mjs: regenerated withnode scripts/generate-token-docs.mjs.packages/core/api-report.md: the two lines that carry the accent's default value.MetadataList.tsx,useTableSortable.tsx,DateRangeInput.tsx: text colour reads--color-text-accent.contrast.test.ts: the stock-pair guard reads both halves throughresolveThemeToken.packages/native/.../DefaultTheme.swift: the generated Swift default theme's dark accent, so the Swift theme stays in step with Core.@astryxdesign/coreand@astryxdesign/cli.The docs' light/dark tuple examples (
theme.doc.mjs,use-a-theme.doc.mjs) only show the tuple syntax, so they keep their values.Writing rubric results
Run over the
architecture:theme-tokens,Button.spec.mdandDateRangeInput.spec.mdchanges:Scope
Testing
vitest run packages/core/src/theme packages/core/src/Button scripts/check-theme-template.test.mjs packages/cli/api/theme packages/cli/foundation/doc-compiler packages/themes: 2,580 passed; andvitest run packages/core/src/theme packages/core/src/MetadataList packages/core/src/Table/plugins/sortable packages/core/src/DateRangeInput packages/core/src/Button: 1,992 passed.check-knowledge,check-changesets, changeset coverage,prettier: clean.