Skip to content

Commit

Permalink
fix: add color alias for surface-raised-active-text
Browse files Browse the repository at this point in the history
  • Loading branch information
SimeonC committed May 29, 2024
1 parent 172059c commit 78a0633
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
7 changes: 7 additions & 0 deletions system/core/scripts/updateFromFigma.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ if (missingDarkVars.length) {
);
}

// Frequently needed dark/light aliases
colorVars.light.push(['surface-raised-active-text', 'var(--brand-primary)']);
colorVars.dark.push([
'surface-raised-active-text',
'var(--brand-primary-text)'
]);

const themeContent = `// eslint-disable-next-line eslint-comments/disable-enable-pair
/* eslint-disable max-lines */
import { css, themedCss } from '../utils';
Expand Down
8 changes: 6 additions & 2 deletions system/core/src/themeVariables/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export const lightColors = css`
--warning-surface: rgba(255, 250, 223, 1);
--warning-surface-hover: rgba(255, 248, 212, 1);
--warning-text: rgba(146, 107, 7, 1);
--surface-raised-active-text: var(--brand-primary);
`;

export const lightColorsObject = {
Expand Down Expand Up @@ -155,7 +156,8 @@ export const lightColorsObject = {
warning: 'rgba(232, 183, 47, 1)',
'warning-surface': 'rgba(255, 250, 223, 1)',
'warning-surface-hover': 'rgba(255, 248, 212, 1)',
'warning-text': 'rgba(146, 107, 7, 1)'
'warning-text': 'rgba(146, 107, 7, 1)',
'surface-raised-active-text': 'var(--brand-primary)'
};

export const darkColors = css`
Expand Down Expand Up @@ -227,6 +229,7 @@ export const darkColors = css`
--warning-surface: rgba(140, 103, 0, 1);
--warning-surface-hover: rgba(159, 116, 0, 1);
--warning-text: rgba(254, 246, 223, 1);
--surface-raised-active-text: var(--brand-primary-text);
`;

export const darkColorsObject = {
Expand Down Expand Up @@ -296,7 +299,8 @@ export const darkColorsObject = {
warning: 'rgba(239, 194, 72, 1)',
'warning-surface': 'rgba(140, 103, 0, 1)',
'warning-surface-hover': 'rgba(159, 116, 0, 1)',
'warning-text': 'rgba(254, 246, 223, 1)'
'warning-text': 'rgba(254, 246, 223, 1)',
'surface-raised-active-text': 'var(--brand-primary-text)'
};

export const brandColors = css`
Expand Down
1 change: 1 addition & 0 deletions system/core/src/themeVariables/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export interface TableKitCSSProperties {
'--warning-surface'?: string;
'--warning-surface-hover'?: string;
'--warning-text'?: string;
'--surface-raised-active-text'?: string;
'--primary'?: string;
'--primary-active'?: string;
'--primary-hover'?: string;
Expand Down

0 comments on commit 78a0633

Please sign in to comment.