Skip to content

Commit

Permalink
adding new docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlfieJones committed May 1, 2024
1 parent 63246e9 commit 30983ec
Show file tree
Hide file tree
Showing 31 changed files with 1,158 additions and 78 deletions.
13 changes: 13 additions & 0 deletions css/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,28 @@ async function generateIndexTs() {
}

async function generateCSS() {
let bundle = "";

for (const variant of variants) {
await mkdir(`./dist/${variant}`, { recursive: true });
for (const toggle of files) {
const css = await generateToggleVariantCSS(toggle, variant);
if (variant === "all") bundle += css + "\n";
await writeFile(`./dist/${variant}/${toggle}.css`, css);
await generateTSExport(toggle, variant, css);
}
}

const compiledBundle = new TextDecoder().decode(
transform({
code: new TextEncoder().encode(bundle),
filename: "bundle.css",
minify: true,
}).code
);

await writeFile(`./dist/bundle.css`, compiledBundle);

await generateIndexTs();
}

Expand Down
1 change: 1 addition & 0 deletions css/src/utils.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
}
} @else {
#{$toggledClass}:not(label).theme-toggle,
#{$globalToggleClass} .theme-toggle:not(#{$untoggledClass}):not(label),
.theme-toggle input[type="checkbox"]:checked ~ {
.theme-toggle__#{$name} {
@content;
Expand Down
Loading

0 comments on commit 30983ec

Please sign in to comment.