Skip to content

Commit

Permalink
fix(chore): also use 3 layer logic for colors.less
Browse files Browse the repository at this point in the history
The colors.less file was not respecting the 3 layer logic (default->theme->site).
  • Loading branch information
lubber-de authored Dec 25, 2022
1 parent 3f3fee4 commit 0b65a82
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
@import "@{themesFolder}/default/globals/site.variables";

/* Packaged site.variables */
@import (optional) "@{themesFolder}/@{site}/globals/site.variables";
& when not (@site = "default") {
@import (optional) "@{themesFolder}/@{site}/globals/site.variables";
}

/* Component's site.variables */
& when not (@theme = "default") {
Expand Down Expand Up @@ -46,8 +48,18 @@
/* Default */
@import "@{themesFolder}/default/globals/colors.less";

/* Packaged colors.less */
& when not (@site = "default") {
@import (optional) "@{themesFolder}/@{site}/globals/colors.less";
}

/* Packaged Theme */
& when not (@theme = "default") {
@import (optional) "@{themesFolder}/@{theme}/globals/colors.less";
}

/* Site Theme */
@import (optional) "@{themesFolder}/@{site}/globals/colors.less";
@import (optional) "@{siteFolder}/globals/colors.less";

/*******************************
Mix-ins
Expand Down

0 comments on commit 0b65a82

Please sign in to comment.