Need a better documentation of "How to override variables in bootstrap"?
See original GitHub issueusing ttps://github.com/bootstrap-vue/webpack sample generated
added the following `<template>
<div class="appmenu"> <b-navbar toggleable="md" type="dark" variant="primary"><b-navbar-toggle target="nav_collapse"></b-navbar-toggle>
<b-navbar-brand href="/index">Home</b-navbar-brand>
<b-collapse is-nav id="nav_collapse">
<b-navbar-nav>
<b-nav-item href="/appwizard">Register Application in Azure AD </b-nav-item>
</b-navbar-nav>
<!-- Right aligned nav items -->
<b-navbar-nav class="ml-auto">
<b-nav-item-dropdown right>
<!-- Using button-content slot -->
<template slot="button-content">
<em>User</em>
</template>
<b-dropdown-item href="#">Signout</b-dropdown-item>
</b-nav-item-dropdown>
</b-navbar-nav>
</b-collapse>
</b-navbar>
<span class="red">{{ menumsg }}</span>
junk
</div>
</template>
<style>
bg-primary {
background-color: #3f3f3f!important;
}
</style>
` works but not
`
<style> .bg-primary { background-color: #3f3f3f; } </style>`
How to do this without !important
how to override primary such that all values of $primary in bootstrap are replaced since bootstrap-vue recommends to use css files and components and variant components
Also, Need a better documentation with example of how to override variants than explained here: https://bootstrap-vue.js.org/docs/reference/color-variants/
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Theming Bootstrap
Override a variable's value and recompile with npm run test as needed. You can find and customize these variables for key global options...
Read more >How to Edit, Customize, and Override Bootstrap CSS to Suit ...
Learn how to override Bootstrap CSS using simple CSS overrides or Sass variables and maps to customize your site.
Read more >Overriding Bootstrap 4.0 Variables - Walkthrough - YouTube
One of the most powerful things you can do with Bootstrap is to override variables that control the colors, fonts, breakpoints and more....
Read more >Howto override Bootstrap variables? [#3164909] | Drupal.org
Reproduce all the steps in the theme page and readme. Copy some variables from @import "../_npm/node_modules/bootstrap/scss/bootstrap"; to / ...
Read more >How To Override Bootstrap-Sass Using Sass Variables?
We know that we have to override the Bootstrap style to give a new look to the website. Just like for theme-background, fonts,...
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
Can you fix the highlighting in your issue post? It’s quite hard to read.
In terms of theming, the easiest thing to do is import your variables globally in webpack. For me this looks like
And then
variables.scss
contains all of my custom variables or variable overrides, then imports the bootstrap variables after. This means it uses my variables and then defaults to bootstrap for the rest. This also means that these variables are available in all of my components<style>
blocks.+1