Improve gradients and add .bg-gradient helper class#30583
Conversation
|
The white-black gradient blends with the background-color and makes it appear a little muddy as I call it—the black washes out the buttons and labels there. Gradients should be specific to each color. |
|
It also sort of looks not flat anymore, but maybe it's just my eyes. I personally prefer the current (flat) approach. |
|
I agree with the visual diff, however I really like the simpler gradient helper. May something like filters or blend modes be useful to improve the visual result? |
ba351a5 to
845cfc3
Compare
|
Ok, removed the black in the gradient. The gradient is now a semi-transparent white gradient, which has the same effect as the Sass You can test the buttons by adding |
52377fe to
216c8b7
Compare
.bg-gradient helper class
|
FYI: the deprecation PR was merged, but this one isn't yet. |
In the future you should put a TODO in the PRs referencing the order of merging. |
6d5bfc3 to
6ecce96
Compare
|
Sorry, I missed the notification. I'd like @mdo's opinion on this before merging. I think it looks OK AFAICT. |
|
@mdo it would make sense to land this sooner than later since the v4 deprecation patch has landed. |
- 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
08d3885 to
fe9dcc2
Compare
Use a semitransparent gradient from light to dark which works on any background-colorRestored.bg-gradient-*variants in favour of.bg-gradientwhich works even when$enable-gradientsare enabledTODO:
bg-gradient-variant()mixin inv4Demo: https://deploy-preview-30583--twbs-bootstrap.netlify.app/docs/5.0/utilities/colors/#background-gradient