diff options
author | Martijn Cuppens <martijn.cuppens@gmail.com> | 2020-04-14 17:28:20 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2020-05-15 15:03:12 +0300 |
commit | b531bda07cbea2e124194aefe3b8597b3ac2578e (patch) | |
tree | 0c39842174e325622e65cbafe5e31b512e464500 /scss/mixins/_gradients.scss | |
parent | bbeda10e372f33e80fbc2095a71d5a1fc86f8e30 (diff) |
Improve gradients
- Use a semitransparent gradient from light to dark which works on any background-color
- Store the gradient as a custom property (--bs-gradient)
- Remove `.bg-gradient-*` variants in favour of `.bg-gradient` which works even when `$enable-gradients` are enabled
- Add gradients to navbar, active page links and badges when gradients are enabled
Diffstat (limited to 'scss/mixins/_gradients.scss')
-rw-r--r-- | scss/mixins/_gradients.scss | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/scss/mixins/_gradients.scss b/scss/mixins/_gradients.scss index cecabc9139..8b87c0f15e 100644 --- a/scss/mixins/_gradients.scss +++ b/scss/mixins/_gradients.scss @@ -1,14 +1,10 @@ // Gradients -@mixin gradient-bg($color, $foreground: null) { +@mixin gradient-bg($color: null) { + background-color: $color; + @if $enable-gradients { - @if $foreground { - background-image: $foreground, linear-gradient(180deg, mix($body-bg, $color, 15%), $color); - } @else { - background-image: linear-gradient(180deg, mix($body-bg, $color, 15%), $color); - } - } @else { - background-color: $color; + background-image: var(--bs-gradient); } } |