Repository navigation
feat(core): alias --destructive to the danger roles and move components off destructive utilities - #583
Open
wemra3 wants to merge 11 commits into
Open
feat(core): alias --destructive to the danger roles and move components off destructive utilities#583wemra3 wants to merge 11 commits into
wemra3 wants to merge 11 commits into
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…date snapshots Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
Regenerate docs-manifest.json with docs:sync after the typography and breadcrumb docs landed on main; no source conflicts.
wemra3
marked this pull request as ready for review
October 8, 2026 00:21
Resolve conflicts with the typography roles (#572): list both --destructive* and --app-shell-type-* as inherited in theme.css and _template.css, and regenerate docs-manifest.json with docs:sync.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #569. Second step of the colour-role work: one red.
What this PR does
--destructiveand--destructive-foregroundbecome aliases of the danger roles (--danger-solid,--danger-contrast), and the shipped components stop usingdestructiveutilities:text-destructivetext-danger-textButton variant="destructive"bg-destructive text-white,dark:bg-destructive/60bg-danger-solid text-danger-contrast, hoverdanger-solid-hoverborder-destructive,ring-destructive/20(dark/40)border-danger-solid,ring-danger-solid/20(dark/40)bg-destructive/10,/5bg-danger-surfaceborder-destructive/50border-danger-borderNames stay.
Button variant="destructive",text-destructive,bg-destructiveandborder-destructivekeep working and are not deprecated. They are the shadcn vocabulary.cream,bloomand_template.cssno longer set--destructive. Their values were identical to the default, so nothing changes visually.--destructiveis on the DO NOT SET list now.What changes for consumers
Button variant="destructive"is a full#dc2626fill with white text (4.83:1). It was#f87171at 60% opacity. The 60% trick existed because white text on#f87171is 2.77:1; the solid role does not need it. Light mode is unchanged.text-destructivenow resolves to the solid. In dark mode that is#dc2626, 3.71:1 on the card, which is below 4.5:1 for text. For text, usetext-danger-text(light#ce0c17, dark#ff9083). The migration entry says how to find these.#f87171to#dc2626(3.71:1, above the 3:1 non-text minimum). Invalid inputs keep the solid on purpose: theborderrole (step a6) is 1.67:1 on the card and would fail.--destructiveno longer reach the shipped components. Override--danger-solid(and--danger-text,--danger-contrast,--danger-solid-hover) instead.Screenshots (default palette, example app):
Dark mode, default palette. Light mode is unchanged (
#dc2626before and after).#dc2626#f87171at 60%#dc2626#dc2626Not in this PR
theme-tailor.cssstill overrides--destructive(2 lines), and the Theme Generator still emits it. Both stop reaching the components; they need to move to--danger-*on their side.text-destructive(cp-apps 10 places, erp-kit 26) keeps working but gets the solid colour in dark mode. Migrating them totext-danger-textis a change in those repositories.Menu.Itemhas no danger variant. The recipe given in tailor-professional-service/knowledge#94 (astw:text-destructive astw:data-highlighted:text-destructiveonMenu.Item) drops to 3.71:1 in dark mode after this PR. Usetext-danger-textinstead. AMenu.Itemdanger variant, like shadcn'sDropdownMenuItem variant="destructive", is a possible follow-up.border-destructive(timeline, document-detail outlines) and the dateddecisions/date-picker.mdsnippets.Checks
semantic-contrast.test.ts: both aliases resolve to the danger roles; danger solid is at least 3:1 over--cardand--backgroundin light and dark.button.test.tsx: the destructive variant uses only bridged danger utilities.destructivetodangerclass swap only.decisions/semantic-color-roles.md(Danger action row done, dated update).🤖 Generated with Claude Code