Skip to content

Commit

Permalink
change to only include -next files from characteristics and palette d…
Browse files Browse the repository at this point in the history
…irs. foundations only override if -next file is provided
  • Loading branch information
libertymayc committed May 17, 2024
1 parent d93d47c commit 2bb83c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 866 deletions.
2 changes: 0 additions & 2 deletions packages/theme/css/characteristics/navigable-next.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.salt-theme.salt-theme-next {
--salt-navigable-indicator-hover: var(--salt-palette-neutral);
--salt-navigable-indicator-active: var(--salt-palette-accent);

/* --salt-navigable-background-hover: var(--salt-palette-navigate-background-hover); */
}
7 changes: 4 additions & 3 deletions packages/theme/json/parsers/getCssVariablesFromDir.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,19 +179,20 @@ module.exports = {
const sharpCornerVariables = {};
const files = fs.readdirSync(dirPath);
const dirFiles = files.map((file) => file.replace(".css", ""));
const isFoundationsDir = dirPath.includes("foundations");
files.forEach((file) => {
const filePath = path.join(dirPath, file);
const fileName = file.replace(".css", "");
const stats = fs.statSync(filePath);

const stats = fs.statSync(filePath);
if (stats.isDirectory()) {
// Recursively process subdirectories
Object.assign(cssVariables, getCssVariablesFromDir(filePath));
} else if (
stats.isFile() &&
path.extname(file) === ".css" &&
!dirFiles.includes(`${fileName}-next`) &&
fileName !== "fade" // TODO: consider
((isFoundationsDir && !dirFiles.includes(`${fileName}-next`)) ||
(!isFoundationsDir && fileName.includes("-next")))
) {
processFile(filePath, {
cssVariables,
Expand Down
Loading

0 comments on commit 2bb83c3

Please sign in to comment.