Skip to content

Commit

Permalink
Extract theme texture and gradient into CSS variables
Browse files Browse the repository at this point in the history
  • Loading branch information
spohlenz committed Jul 17, 2024
1 parent 62bc19e commit bb9cf65
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/assets/bundle/trestle/admin.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/css/components/_background.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%textured-bg {
background-image: url(../images/bright-squares.png), linear-gradient(rgba(white, 0.05), rgba(black, 0.05));
background-image: var(--theme-texture), var(--theme-gradient);
background-repeat: repeat, no-repeat;
}

Expand Down
3 changes: 3 additions & 0 deletions frontend/css/core/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ $theme-colors: (
--#{$prefix}#{$color}-border-subtle: #{adjust-theme-hsl($color, $lightness: 60%)};
}

--theme-texture: url(../images/bright-squares.png);
--theme-gradient: #{linear-gradient(rgba(white, 0.05), rgba(black, 0.05))};

--#{$prefix}link-color: var(--primary);
--#{$prefix}link-color-rgb: var(--primary-rgb);
--#{$prefix}link-color-hsl: var(--primary-hsl);
Expand Down

0 comments on commit bb9cf65

Please sign in to comment.