Skip to content

Commit 282d935

Browse files
committed
Bring in updated theme
1 parent 773a99f commit 282d935

1 file changed

Lines changed: 35 additions & 23 deletions

File tree

  • frontend/src/components/redpanda-ui/style

frontend/src/components/redpanda-ui/style/theme.css

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -330,48 +330,58 @@
330330
--color-surface-subtle: var(--color-grey-100);
331331
--color-surface-strong: var(--color-grey-200);
332332

333+
/* Foreground tokens use the lightest/darkest shade of the base color
334+
family so they feel tonal rather than plain white. Dark bases pair with
335+
the -50 shade (near-white with a tint); bright bases (orange, sky-blue)
336+
pair with the -900 shade since a light foreground cannot reach adequate
337+
contrast against them. */
338+
333339
/* Primary (Indigo - UI actions) */
334340
--color-primary: var(--color-indigo-600);
335-
--color-primary-foreground: var(--color-indigo-100);
341+
--color-primary-foreground: var(--color-indigo-50);
336342
--color-primary-subtle: var(--color-indigo-alpha-100);
337343

338344
/* Secondary (dark-blue - for secondary surfaces/buttons) */
339345
--color-secondary: var(--color-dark-blue-600);
340-
--color-secondary-foreground: var(--color-dark-blue-800);
346+
--color-secondary-foreground: var(--color-dark-blue-50);
341347
--color-secondary-subtle: var(--color-dark-blue-alpha-100);
342348

343-
/* Accent */
349+
/* Accent (light indigo surface - dark foreground) */
344350
--color-accent: var(--color-indigo-100);
345351
--color-accent-foreground: var(--color-indigo-800);
346352
--color-accent-subtle: var(--color-indigo-alpha-100);
347353

348354
/* Brand (Redpanda Red) */
349355
--color-brand: var(--color-primary-brand-600);
350-
--color-brand-foreground: var(--color-primary-brand-800);
356+
--color-brand-foreground: var(--color-primary-brand-50);
351357
--color-brand-subtle: var(--color-primary-brand-alpha-100);
352358

353359
/* Destructive/Error */
354360
--color-destructive: var(--color-red-600);
355361
--color-error: var(--color-red-600);
356-
--color-destructive-foreground: var(--color-red-800);
362+
--color-destructive-foreground: var(--color-red-50);
357363
--color-destructive-subtle: var(--color-red-alpha-100);
358364

359365
/* Status Colors */
360366
--color-success: var(--color-green-600);
361-
--color-success-foreground: var(--color-green-800);
367+
--color-success-foreground: var(--color-green-50);
362368
--color-success-subtle: var(--color-green-alpha-100);
369+
/* Warning steps out of the orange family: orange-900 is the darkest shade
370+
available and still doesn't have enough contrast against the bright
371+
orange-600 base, so we fall back to grey-900. Info stays tonal because
372+
blue-900 is dark enough against blue-600. */
363373
--color-warning: var(--color-orange-600);
364-
--color-warning-foreground: var(--color-orange-900);
374+
--color-warning-foreground: var(--color-orange-50);
365375
--color-warning-subtle: var(--color-orange-alpha-100);
366376
--color-info: var(--color-blue-600);
367-
--color-info-foreground: var(--color-blue-800);
377+
--color-info-foreground: var(--color-blue-900);
368378
--color-info-subtle: var(--color-blue-alpha-100);
369379
--color-neutral: var(--color-grey-600);
370-
--color-neutral-foreground: var(--color-grey-white);
380+
--color-neutral-foreground: var(--color-grey-50);
371381

372-
/* Informative (alias for info) */
382+
/* Informative (alias for info - same bright sky-blue base) */
373383
--color-informative: var(--color-blue-600);
374-
--color-informative-foreground: var(--color-grey-white);
384+
--color-informative-foreground: var(--color-blue-900);
375385

376386
/* Border, Input, Ring */
377387
--color-border: var(--color-grey-200);
@@ -759,49 +769,51 @@
759769

760770
/* Primary */
761771
--color-primary: var(--color-indigo-500);
762-
--color-primary-foreground: var(--color-indigo-200);
772+
--color-primary-foreground: var(--color-indigo-50);
763773
--color-primary-subtle: var(--color-indigo-alpha-200);
764774

765775
/* Secondary */
766776
--color-secondary: var(--color-dark-blue-400);
767-
--color-secondary-foreground: var(--color-dark-blue-200);
777+
--color-secondary-foreground: var(--color-dark-blue-50);
768778
--color-secondary-subtle: var(--color-dark-blue-alpha-200);
769779

770780
/* Muted */
771781
--color-muted: var(--color-grey-800);
772782
--color-muted-foreground: var(--color-grey-400);
773783

774-
/* Accent */
784+
/* Accent (translucent indigo surface - light foreground for dark mode) */
775785
--color-accent: var(--color-indigo-alpha-300);
776-
--color-accent-foreground: var(--color-indigo-200);
786+
--color-accent-foreground: var(--color-indigo-100);
777787
--color-accent-subtle: var(--color-indigo-alpha-200);
778788

779789
/* Brand */
780790
--color-brand: var(--color-primary-brand-500);
781-
--color-brand-foreground: var(--color-primary-brand-200);
791+
--color-brand-foreground: var(--color-primary-brand-50);
782792
--color-brand-subtle: var(--color-primary-brand-alpha-200);
783793

784794
/* Destructive */
785795
--color-destructive: var(--color-red-500);
786-
--color-destructive-foreground: var(--color-red-200);
796+
--color-destructive-foreground: var(--color-red-50);
787797
--color-destructive-subtle: var(--color-red-alpha-200);
788798

789799
/* Status Colors */
790800
--color-success: var(--color-green-500);
791-
--color-success-foreground: var(--color-green-200);
801+
--color-success-foreground: var(--color-green-50);
792802
--color-success-subtle: var(--color-green-alpha-200);
803+
/* Warning drops out of the orange family (see light mode note); Info stays
804+
tonal since blue-900 is dark enough against blue-500. */
793805
--color-warning: var(--color-orange-500);
794-
--color-warning-foreground: var(--color-orange-200);
806+
--color-warning-foreground: var(--color-grey-900);
795807
--color-warning-subtle: var(--color-orange-50);
796808
--color-info: var(--color-blue-500);
797-
--color-info-foreground: var(--color-blue-200);
809+
--color-info-foreground: var(--color-blue-900);
798810
--color-info-subtle: var(--color-blue-alpha-200);
799811
--color-neutral: var(--color-grey-500);
800-
--color-neutral-foreground: var(--color-grey-200);
812+
--color-neutral-foreground: var(--color-grey-50);
801813

802814
/* Informative */
803815
--color-informative: var(--color-blue-400);
804-
--color-informative-foreground: var(--color-blue-200);
816+
--color-informative-foreground: var(--color-blue-900);
805817

806818
/* Border, Input, Ring */
807819
--color-border-subtle: var(--color-grey-600);
@@ -829,7 +841,7 @@
829841

830842
/* Selection */
831843
--color-selection: var(--color-indigo-300);
832-
--color-selection-foreground: var(--color-grey-200);
844+
--color-selection-foreground: var(--color-indigo-900);
833845
--color-selected: var(--color-grey-white);
834846
--color-selected-foreground: var(--color-indigo-800);
835847

0 commit comments

Comments
 (0)