Skip to content

Commit

Permalink
refactor: dont use @name outside of metadata block
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed Dec 13, 2023
1 parent 9400414 commit 465926d
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 37 deletions.
2 changes: 1 addition & 1 deletion compiled.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions scripts/import-styles/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const settings = {
};

const data = [settings];

for await (const entry of stylesheets) {
const content = await Deno.readTextFile(entry.path);
const {metadata} = usercssMeta.parse(content);
Expand Down
6 changes: 3 additions & 3 deletions styles/chess.com/catppuccin.user.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@name Chess.com Catppuccin
@namespace github.com/catppuccin/userstyles/styles/chess.com
@homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/chess.com
@version 0.1.2
@version 0.1.3
@updateURL https://github.com/catppuccin/userstyles/raw/main/styles/chess.com/catppuccin.user.css
@description Soothing pastel theme for Chess.com
@author Catppuccin
Expand Down Expand Up @@ -61,8 +61,8 @@
@crust: @catppuccin[@@lookup][@crust];
@accent-color: @catppuccin[@@lookup][@@accent];

#piece(@name) {
@url: url("https://media.githubusercontent.com/media/catppuccin/userstyles/main/styles/chess.com/assets/@{lookup}/@{name}.png");
#piece(@piece) {
@url: url("https://media.githubusercontent.com/media/catppuccin/userstyles/main/styles/chess.com/assets/@{lookup}/@{piece}.png");
}

@bb: #piece("b/bb") [];
Expand Down
64 changes: 31 additions & 33 deletions styles/github/catppuccin.user.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@name Github Catppuccin
@namespace github.com/catppuccin/userstyles/styles/github
@homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/github
@version 1.3.2
@version 1.3.3
@description Soothing pastel theme for GitHub
@author Catppuccin
@updateURL https://github.com/catppuccin/userstyles/raw/main/styles/github/catppuccin.user.css
Expand Down Expand Up @@ -57,49 +57,49 @@
z-index: 9999;
}

#coloredButton(@name, @color, @flat) {
#coloredButton(@item, @color, @flat) {
& when (@flat) {
--color-btn-@{name}-text: @color;
--color-btn-@{name}-bg: @base;
--color-btn-@{name}-icon: @color;
--color-btn-@{item}-text: @color;
--color-btn-@{item}-bg: @base;
--color-btn-@{item}-icon: @color;

--color-btn-@{name}-hover-text: @base;
--color-btn-@{name}-hover-bg: @color;
--color-btn-@{name}-hover-border: @color;
--color-btn-@{item}-hover-text: @base;
--color-btn-@{item}-hover-bg: @color;
--color-btn-@{item}-hover-border: @color;

--color-btn-@{name}-selected-text: @base;
--color-btn-@{name}-selected-bg: @color;
--color-btn-@{name}-selected-border: @color;
--color-btn-@{item}-selected-text: @base;
--color-btn-@{item}-selected-bg: @color;
--color-btn-@{item}-selected-border: @color;

--color-btn-@{name}-disabled-text: fadeout(@color, 60%);
--color-btn-@{name}-disabled-bg: @mantle;
--color-btn-@{item}-disabled-text: fadeout(@color, 60%);
--color-btn-@{item}-disabled-bg: @mantle;
}

& when not (@flat) {
--color-btn-@{name}-text: @base;
--color-btn-@{name}-bg: @color;
--color-btn-@{name}-icon: @base;
--color-btn-@{item}-text: @base;
--color-btn-@{item}-bg: @color;
--color-btn-@{item}-icon: @base;

--color-btn-@{name}-hover-text: @base;
--color-btn-@{name}-hover-bg: lighten(@color, 10%);
--color-btn-@{name}-hover-border: lighten(@color, 10%);
--color-btn-@{item}-hover-text: @base;
--color-btn-@{item}-hover-bg: lighten(@color, 10%);
--color-btn-@{item}-hover-border: lighten(@color, 10%);

--color-btn-@{name}-selected-text: @base;
--color-btn-@{name}-selected-bg: lighten(@color, 10%);
--color-btn-@{name}-selected-border: lighten(@color, 10%);
--color-btn-@{item}-selected-text: @base;
--color-btn-@{item}-selected-bg: lighten(@color, 10%);
--color-btn-@{item}-selected-border: lighten(@color, 10%);

--color-btn-@{name}-disabled-text: @crust;
--color-btn-@{name}-disabled-bg: fadeout(@color, 60%);
--color-btn-@{item}-disabled-text: @crust;
--color-btn-@{item}-disabled-bg: fadeout(@color, 60%);
}

--color-btn-@{name}-hover-icon: @base;
--color-btn-@{item}-hover-icon: @base;

/* set these to transparent for the looks */
--color-btn-@{name}-border: transparent;
--color-btn-@{name}-shadow: 0 0 transparent;
--color-btn-@{name}-inset-shadow: 0 0 transparent;
--color-btn-@{name}-selected-shadow: 0 0 transparent;
--color-btn-@{name}-disabled-border: transparent;
--color-btn-@{item}-border: transparent;
--color-btn-@{item}-shadow: 0 0 transparent;
--color-btn-@{item}-inset-shadow: 0 0 transparent;
--color-btn-@{item}-selected-shadow: 0 0 transparent;
--color-btn-@{item}-disabled-border: transparent;
}

#catppuccin(@lookup, @accent) {
Expand Down Expand Up @@ -996,9 +996,7 @@

.jykkjb {
background-color: @base;
box-shadow:
@crust 0 -2px 0 inset,
@crust 0 1px 0 inset;
box-shadow: @crust 0 -2px 0 inset, @crust 0 1px 0 inset;
}

.jhjELj,
Expand Down

0 comments on commit 465926d

Please sign in to comment.