<b-button variant="foo"> uses original bootstrap color, instead of variable override.
See original GitHub issueDescribe the bug
<b-button>
variant does not inherit colors from the $theme-colors
bootstrap scss variables like it is supposed to.
Steps to reproduce the bug
- Create a fresh project
- Create
theme.scss
and override$theme-colors
per documentation e.g.
$theme-colors: (
primary: #2D3047;
);
- In the template html, create
<b-button variant="primary">Foo</b-button>
- Observe that the color of the button is not
#2D3047
but instead#007BFF
Expected behavior
When creating a <b-button>
with a variant and $theme-colors
overridden, the variant of <b-button>
should reflect the new $theme-colors
color, not the original bootstrap color.
Versions
Libraries:
- BootstrapVue: 2.12.0
- Bootstrap: 4.4.1
- Vue: 2.6.11
Environment:
- Device: Desktop
- OS: Windows 10 LTSC
- Browser: Firefox
- Version: 79
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Theming Bootstrap
We use Sass maps for our colors, grid breakpoints, and more. Just like Sass variables, all Sass maps include the !default flag and...
Read more >How to change btn color in Bootstrap - css - Stack Overflow
Now that Bootstrap 4 uses SASS, you can easily change the primary button color using the button-variant mixins: $mynewcolor:#77cccc; .btn-primary { @include ...
Read more >Color Variants | Reference - BootstrapVue
Color variants available when using the default Bootstrap v4 CSS and their mappings to CSS classes.
Read more >Discussions - GitHub
Bootstrap 5.1/5.2 Introduce CSS variables, but they don't work in emails. ... button-variant( $background, $border, $color: color-contrast($background), ...
Read more >Features In-Depth | Less.js
This feature is not required because you can easily override a variable by putting the definition afterwards. For instance: // library @base-color: green;...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve never used @extend, so can’t say for sure. But you can refer to the link if you only need
mixins
,functions
andvariables
in your SFC’s.Are you importing anything into a scoped style tag?
<style scoped>
.data-v-xxxxxx
is added when using scoped style tags to limit the CSS to that component only.