Skip to content

Commit

Permalink
feat(css/scss/less): add ansi colours
Browse files Browse the repository at this point in the history
  • Loading branch information
sgoudham committed Nov 1, 2024
1 parent 4411eaf commit 16ff8bd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/builders/npm/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ const template = flavorEntries
const ansiColors = ansiColorEntries.map(
([ansiColorName, { normal, bright }]) => {
return [normal, bright].map((group) => {
const name = `--ctp-${flavorName}-ansi-${group}-${ansiColorName}`;
return sprintf(" %s: %s;", name, group.hex);
const name =
`--ctp-${flavorName}-ansi-${group.name.toLowerCase()}-${ansiColorName}`;
return sprintf(" %s: %s;", name, group.hex);
}).join("\n");
},
);
).join("\n");

return `:root {\n${colors}\n${ansiColors}\n}`;
})
Expand Down

0 comments on commit 16ff8bd

Please sign in to comment.