Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 42 additions & 42 deletions packages/module/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,24 +216,24 @@ const build = (selector) => {
const layersHighContrastDarkSD = StyleDictionary.extend(__dirname + '/config.layers.highcontrast-dark.json');
layersHighContrastDarkSD.buildAllPlatforms();

console.log('Building layer configs for redhat themes...');
const layersRedhatSD = StyleDictionary.extend(__dirname + '/config.layers.redhat.json');
layersRedhatSD.buildAllPlatforms();
console.log('Building layer configs for felt themes...');
const layersFeltSD = StyleDictionary.extend(__dirname + '/config.layers.felt.json');
layersFeltSD.buildAllPlatforms();

const layersRedhatDarkSD = StyleDictionary.extend(__dirname + '/config.layers.redhat-dark.json');
layersRedhatDarkSD.buildAllPlatforms();
const layersFeltDarkSD = StyleDictionary.extend(__dirname + '/config.layers.felt-dark.json');
layersFeltDarkSD.buildAllPlatforms();

const layersRedhatGlassSD = StyleDictionary.extend(__dirname + '/config.layers.redhat-glass.json');
layersRedhatGlassSD.buildAllPlatforms();
const layersFeltGlassSD = StyleDictionary.extend(__dirname + '/config.layers.felt-glass.json');
layersFeltGlassSD.buildAllPlatforms();

const layersRedhatGlassDarkSD = StyleDictionary.extend(__dirname + '/config.layers.redhat-glass-dark.json');
layersRedhatGlassDarkSD.buildAllPlatforms();
const layersFeltGlassDarkSD = StyleDictionary.extend(__dirname + '/config.layers.felt-glass-dark.json');
layersFeltGlassDarkSD.buildAllPlatforms();

const layersRedhatHighContrastSD = StyleDictionary.extend(__dirname + '/config.layers.redhat-highcontrast.json');
layersRedhatHighContrastSD.buildAllPlatforms();
const layersFeltHighContrastSD = StyleDictionary.extend(__dirname + '/config.layers.felt-highcontrast.json');
layersFeltHighContrastSD.buildAllPlatforms();

const layersRedhatHighContrastDarkSD = StyleDictionary.extend(__dirname + '/config.layers.redhat-highcontrast-dark.json');
layersRedhatHighContrastDarkSD.buildAllPlatforms();
const layersFeltHighContrastDarkSD = StyleDictionary.extend(__dirname + '/config.layers.felt-highcontrast-dark.json');
layersFeltHighContrastDarkSD.buildAllPlatforms();

// Step 3: Build glass themes
console.log('Building glass themes...');
Expand All @@ -254,59 +254,59 @@ const build = (selector) => {
path.join(buildPath, 'tokens-glass-dark.scss')
);

// Step 5: Build redhat themes
console.log('Building redhat themes...');
const redhatExtendedSD = StyleDictionary.extend(__dirname + '/config.redhat.json');
redhatExtendedSD.buildAllPlatforms();
// Step 5: Build felt themes
console.log('Building felt themes...');
const feltExtendedSD = StyleDictionary.extend(__dirname + '/config.felt.json');
feltExtendedSD.buildAllPlatforms();

const redhatDarkExtendedSD = StyleDictionary.extend(__dirname + '/config.redhat-dark.json');
redhatDarkExtendedSD.buildAllPlatforms();
const feltDarkExtendedSD = StyleDictionary.extend(__dirname + '/config.felt-dark.json');
feltDarkExtendedSD.buildAllPlatforms();

const redhatGlassExtendedSD = StyleDictionary.extend(__dirname + '/config.redhat-glass.json');
redhatGlassExtendedSD.buildAllPlatforms();
const feltGlassExtendedSD = StyleDictionary.extend(__dirname + '/config.felt-glass.json');
feltGlassExtendedSD.buildAllPlatforms();

const redhatGlassDarkExtendedSD = StyleDictionary.extend(__dirname + '/config.redhat-glass-dark.json');
redhatGlassDarkExtendedSD.buildAllPlatforms();
const feltGlassDarkExtendedSD = StyleDictionary.extend(__dirname + '/config.felt-glass-dark.json');
feltGlassDarkExtendedSD.buildAllPlatforms();

const redhatHighContrastExtendedSD = StyleDictionary.extend(__dirname + '/config.redhat-highcontrast.json');
redhatHighContrastExtendedSD.buildAllPlatforms();
const feltHighContrastExtendedSD = StyleDictionary.extend(__dirname + '/config.felt-highcontrast.json');
feltHighContrastExtendedSD.buildAllPlatforms();

const redhatHighContrastDarkExtendedSD = StyleDictionary.extend(__dirname + '/config.redhat-highcontrast-dark.json');
redhatHighContrastDarkExtendedSD.buildAllPlatforms();
const feltHighContrastDarkExtendedSD = StyleDictionary.extend(__dirname + '/config.felt-highcontrast-dark.json');
feltHighContrastDarkExtendedSD.buildAllPlatforms();

// Set glass tokens to initial in redhat non-glass themes
console.log('Setting glass tokens to initial in redhat themes...');
setGlassTokensToInitial(path.join(buildPath, 'tokens-redhat.scss'));
setGlassTokensToInitial(path.join(buildPath, 'tokens-redhat-dark.scss'));
setGlassTokensToInitial(path.join(buildPath, 'tokens-redhat-highcontrast.scss'));
setGlassTokensToInitial(path.join(buildPath, 'tokens-redhat-highcontrast-dark.scss'));
// Set glass tokens to initial in felt non-glass themes
console.log('Setting glass tokens to initial in felt themes...');
setGlassTokensToInitial(path.join(buildPath, 'tokens-felt.scss'));
setGlassTokensToInitial(path.join(buildPath, 'tokens-felt-dark.scss'));
setGlassTokensToInitial(path.join(buildPath, 'tokens-felt-highcontrast.scss'));
setGlassTokensToInitial(path.join(buildPath, 'tokens-felt-highcontrast-dark.scss'));

// Step 6: Remove duplicate variables from redhat SCSS files
console.log('Removing duplicate variables from redhat themes...');
// Step 6: Remove duplicate variables from felt SCSS files
console.log('Removing duplicate variables from felt themes...');
removeDuplicateVariables(
path.join(buildPath, 'tokens-default.scss'),
path.join(buildPath, 'tokens-redhat.scss')
path.join(buildPath, 'tokens-felt.scss')
);
removeDuplicateVariables(
path.join(buildPath, 'tokens-dark.scss'),
path.join(buildPath, 'tokens-redhat-dark.scss')
path.join(buildPath, 'tokens-felt-dark.scss')
);
// Redhat glass themes compare against default (not glass), because they source all default/glass tokens
// Felt glass themes compare against default (not glass), because they source all default/glass tokens
removeDuplicateVariables(
path.join(buildPath, 'tokens-default.scss'),
path.join(buildPath, 'tokens-redhat-glass.scss')
path.join(buildPath, 'tokens-felt-glass.scss')
);
removeDuplicateVariables(
path.join(buildPath, 'tokens-dark.scss'),
path.join(buildPath, 'tokens-redhat-glass-dark.scss')
path.join(buildPath, 'tokens-felt-glass-dark.scss')
);
removeDuplicateVariables(
path.join(buildPath, 'tokens-default.scss'),
path.join(buildPath, 'tokens-redhat-highcontrast.scss')
path.join(buildPath, 'tokens-felt-highcontrast.scss')
);
removeDuplicateVariables(
path.join(buildPath, 'tokens-dark.scss'),
path.join(buildPath, 'tokens-redhat-highcontrast-dark.scss')
path.join(buildPath, 'tokens-felt-highcontrast-dark.scss')
);

console.log('\n============================');
Expand Down
2 changes: 1 addition & 1 deletion packages/module/build/css/tokens-dark.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Mon, 23 Mar 2026 14:56:21 GMT
// Generated on Thu, 30 Apr 2026 21:31:18 GMT

@mixin pf-v6-tokens {
--pf-t--global--background--color--action--plain--default: rgba(0, 0, 0, 0.0000);
Expand Down
6 changes: 3 additions & 3 deletions packages/module/build/css/tokens-default.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Mon, 23 Mar 2026 14:56:21 GMT
// Generated on Thu, 30 Apr 2026 21:31:18 GMT

@mixin pf-v6-tokens {
--pf-t--global--background--color--500: rgba(21, 21, 21, 0.4000);
Expand Down Expand Up @@ -420,7 +420,7 @@
--pf-t--global--border--color--clicked: var(--pf-t--global--color--brand--200);
--pf-t--global--border--color--control--default: var(--pf-t--global--border--color--300);
--pf-t--global--border--color--control--read-only: var(--pf-t--global--border--color--100);
--pf-t--global--border--color--default: var(--pf-t--global--border--color--100);
--pf-t--global--border--color--default: var(--pf-t--global--border--color--50);
--pf-t--global--border--color--disabled: var(--pf-t--global--color--disabled--200);
--pf-t--global--border--color--hover: var(--pf-t--global--color--brand--100);
--pf-t--global--border--color--nonstatus--blue--clicked: var(--pf-t--global--color--nonstatus--blue--300);
Expand Down Expand Up @@ -598,7 +598,7 @@
--pf-t--global--text-decoration--color--default: var(--pf-t--global--border--color--300);
--pf-t--global--text-decoration--offset--default: var(--pf-t--global--spacer--xs);
--pf-t--global--text-decoration--width--default: var(--pf-t--global--border--width--regular);
--pf-t--global--text-decoration--width--hover: var(--pf-t--global--border--width--strong);
--pf-t--global--text-decoration--width--hover: var(--pf-t--global--border--width--regular);
--pf-t--global--background--color--control--default: var(--pf-t--global--background--color--primary--default);
--pf-t--global--background--color--floating--secondary--default: var(--pf-t--global--background--color--secondary--default);
--pf-t--global--background--color--glass--primary--default: initial;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Mon, 23 Mar 2026 14:56:21 GMT
// Generated on Thu, 30 Apr 2026 21:31:19 GMT

// Only tokens that differ from base theme (14 tokens)
@mixin pf-v6-tokens {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Mon, 23 Mar 2026 14:56:21 GMT
// Generated on Thu, 30 Apr 2026 21:31:19 GMT

// Only tokens that differ from base theme (33 tokens)
@mixin pf-v6-tokens {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Mon, 23 Mar 2026 14:56:21 GMT
// Generated on Thu, 30 Apr 2026 21:31:19 GMT

// Only tokens that differ from base theme (23 tokens)
@mixin pf-v6-tokens {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Mon, 23 Mar 2026 14:56:21 GMT
// Generated on Thu, 30 Apr 2026 21:31:19 GMT

// Only tokens that differ from base theme (43 tokens)
@mixin pf-v6-tokens {
Expand Down
Loading
Loading