bug: tactical-amber CTA gradient now follows branding color#461
Open
Flegma wants to merge 2 commits into
Open
Conversation
The tactical-amber CTA gradient (Play button, match/tournament submit, join-match, lobby play, settings save bar, veto pills, clip action tile) hardcoded its two gradient endpoints: hsl(36 100% 65%) and hsl(28 90% 52%). Only the middle stop, border and glow used --tac-amber, so a non-amber "Tactical Accent" branding color produced an orange-to-accent-to-orange gradient instead of a cohesive branded button. Derive both endpoints from --tac-amber with color-mix (a lighter tint and a darker shade) so the whole gradient tracks the Tactical Accent color. With the default amber the gradient is visually unchanged; a custom accent (e.g. blue) now yields a clean single-hue gradient. Also points the dark-mode topo background tint at --tac-amber for consistency.
The tactical-amber CTAs hardcoded near-black ink (hsl(0 0% 8%) / 6%) for their text and the clip action-tile corner accents, so a dark Tactical Accent color would leave unreadable text. Point them at --tac-amber-foreground (the existing color_tactical_amber_foreground branding token, already used by MatchActiveAlert and MatchmakingConfirm) so text contrast is brandable too. The default is near-black, so light/amber accents are visually unchanged.
Contributor
Author
|
Added a follow-up commit (fd06720) addressing the foreground/contrast point from review: the CTAs hardcoded near-black text ( |
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.
Problem
The prominent "tactical amber" CTA gradient hardcoded two of its three gradient stops, so it never fully followed the App Settings → Branding → Tactical Accent color (
--tac-amber).Only the middle stop, border and glow tracked the branding color. Setting a non-amber Tactical Accent (for example a blue brand) produced an
orange -> accent -> orangegradient instead of a cohesive branded button.Fix
Introduce two CSS custom properties derived from
--tac-amberand point every CTA gradient endpoint at them:Now the whole gradient (light tint, base, dark shade) tracks the Tactical Accent color.
Resulting endpoints
33 94% 58%hsl(33 80% 64%)hsl(33 94% 58%)hsl(33 83% 51%)241 76% 58%hsl(241 65% 64%)hsl(241 76% 58%)hsl(241 67% 51%)With the default amber the gradient is visually ~unchanged from the old hardcoded
hsl(36 100% 65%)/hsl(28 90% 52%). A custom accent now yields a clean single-hue gradient.Affected surfaces
pages/players/[id].vue)MatchForm.vue,TournamentForm.vue)MatchTableRow.vue) and lobby play button (MatchLobbies.vue).tac-amber-ctaclass (assets/css/tailwind.css), used by the settings save bar, match active alert, matchmaking confirm and veto confirm pillscomponents/clips/ClipDetailModal.vue)layouts/components/TopoBackground.vue)Out of scope (intentionally untouched)
Semantically-orange colors that are not branding: bronze / 3rd-place trophy (
hsl(28 70% 52%)), Faceit rank orange (hsl(28 95% 55%)), and the T-side replay color (hsl(28 100% 55%)).Notes
color-mix()is already used throughout this repo (for exampleReplayChrome.vue), so the PostCSS pipeline handles it; it is supported in all current browsers.MatchForm.vuethe access-toggle base and hover gradients are now identical; the hover declaration is kept deliberately so the active toggle's gradient is not overridden by the base button'shover:bg-muted.Testing
color-mixHSL math for default and blue accents (see table).