Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(chroma): use catppuccin/chroma #50

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Deno.mkdirSync(path.join(__dirname, "dist"), { recursive: true });
const sassBuilder = (flavor: string, accent: string) => `
@import "@catppuccin/palette/scss/${flavor}";
$accent: $${accent};
$flavor: ${flavor};
$isDark: ${flavor !== "latte"};
@import "theme";
`;
Expand Down
296 changes: 0 additions & 296 deletions src/_chroma.scss

This file was deleted.

6 changes: 5 additions & 1 deletion src/_theme.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@use "sass:color";

@mixin chroma($flavor) {
@import url("https://raw.githubusercontent.com/catppuccin/chroma/012c54d4b3122128c1523fe7ca2d41e9e11be7e4/dist/#{$flavor}-chroma-style.css");
}

// context-aware lighten: darkens if dark, lightens if light
@function ctx_lighten($color, $amount) {
$multiplier: if($isDark, -1, 1);
Expand Down Expand Up @@ -324,6 +328,6 @@ $lvl3: if($isDark, $base, $crust);
background: color.change($accent, $alpha: 0.3) !important;
}

@import "chroma";
@include chroma($flavor);
@import "codemirror";
@import "monaco";