Skip to content

Commit

Permalink
fix: CMD-182 color fix snippet was using core-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyboar committed Aug 23, 2024
1 parent 291efe4 commit 443b30a
Showing 1 changed file with 11 additions and 63 deletions.
Original file line number Diff line number Diff line change
@@ -1,67 +1,15 @@
<style id="css-button-color-in-dark-contexts">
/* So buttons are darker in dark context */
/* HACK: This should be in source code, where it is a one-line change... */
/* FAQ: Core-Styles blue is too light for button, but just right for a link */
.c-footer :is(.c-button--primary, .button--1),
:where(
.c-recognition--style-dark:not(
.c-recognition--style-light *,
.o-section--style-muted *,
.section--muted *,
.o-section--style-light *,
.section--dark *,
.c-card--standard *,
.card--standard *,
.c-card--standard-1 *,
.c-card--standard-2 *,
.c-card--standard-3 *,
.c-card--plain *,
.card--plain *,
[class*="card--plain-"] *
),
.o-section--style-dark:not(
.c-recognition--style-light *,
.o-section--style-muted *,
.section--muted *,
.o-section--style-light *,
.section--dark *,
.c-card--standard *,
.card--standard *,
.c-card--standard-1 *,
.c-card--standard-2 *,
.c-card--standard-3 *,
.c-card--plain *,
.card--plain *,
[class*="card--plain-"] *
),
.section--dark:not(
.c-recognition--style-light *,
.o-section--style-muted *,
.section--muted *,
.o-section--style-light *,
.section--dark *,
.c-card--standard *,
.card--standard *,
.c-card--standard-1 *,
.c-card--standard-2 *,
.c-card--standard-3 *,
.c-card--plain *,
.card--plain *,
[class*="card--plain-"] *
)
) :is(.c-button--primary, .button--1) {
--global-color-accent--normal: #3d6acc;
}
/* To ensure light context colors are still AFTER dark-context colors */
:where(.c-recognition--style-dark .c-recognition--style-light,.c-recognition--style-dark .o-section--style-muted,.c-recognition--style-dark .section--muted,.c-recognition--style-dark .o-section--style-light,.c-recognition--style-dark .section--dark,.c-recognition--style-dark .c-card--standard,.c-recognition--style-dark .card--standard,.c-recognition--style-dark .c-card--standard-1,.c-recognition--style-dark .c-card--standard-2,.c-recognition--style-dark .c-card--standard-3,.c-recognition--style-dark .c-card--plain,.c-recognition--style-dark .card--plain,.c-recognition--style-dark [class*=card--plain-],.o-section--style-dark .c-recognition--style-light,.o-section--style-dark .o-section--style-muted,.o-section--style-dark .section--muted,.o-section--style-dark .o-section--style-light,.o-section--style-dark .section--dark,.o-section--style-dark .c-card--standard,.o-section--style-dark .card--standard,.o-section--style-dark .c-card--standard-1,.o-section--style-dark .c-card--standard-2,.o-section--style-dark .c-card--standard-3,.o-section--style-dark .c-card--plain,.o-section--style-dark .card--plain,.o-section--style-dark [class*=card--plain-],.section--dark .c-recognition--style-light,.section--dark .o-section--style-muted,.section--dark .section--muted,.section--dark .o-section--style-light,.section--dark .section--dark,.section--dark .c-card--standard,.section--dark .card--standard,.section--dark .c-card--standard-1,.section--dark .c-card--standard-2,.section--dark .c-card--standard-3,.section--dark .c-card--plain,.section--dark .card--plain,.section--dark [class*=card--plain-]) :is(.c-button--primary, .button--1) {
--global-color-accent--xxx-light: #dfeafe;
--global-color-accent--xx-light: #caddfe;
--global-color-accent--x-light: #aac7ff;
--global-color-accent--light: #86aeff;
--global-color-accent--normal: #039;
--global-color-accent--dark: #026;
--global-color-accent--x-dark: #013;
--global-color-accent--xx-dark: #021230;
--global-color-accent--xxx-dark: #000a22;
/* FAQ: Copied from the 2nd ruleset of `dist/settings/color--demo.css` */
/* https://github.com/TACC/Core-Styles/blob/enhance/CMD-182-design-tokens/dist/settings/color--demo.css */
:is(:where(:is(.c-recognition--style-dark, :is(.o-section--style-dark, .section--dark)) :is(.c-recognition--style-light, :is(.o-section--style-muted, .section--muted), :is(.o-section--style-light, .section--dark), :is(.c-card--standard, .card--standard), :is(.c-card--standard-1, .c-card--standard-2, .c-card--standard-3), :is(.c-card--plain, .card--plain, [class*=card--plain-])))) {
--global-color-accent--xx-light: #f3faff;
--global-color-accent--x-light: #d2e4f0;
--global-color-accent--light: #b0cfe5;
--global-color-accent--normal: #78a5c3;
--global-color-accent--dark: #53809d;
--global-color-accent--x-dark: #204c68;
--global-color-accent--xx-dark: #003049;
--global-color-accent--xxx-dark: #000
}
</style>

0 comments on commit 443b30a

Please sign in to comment.