-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't change $component-active-bg to my theme color #27712
Comments
It seems to be related with #27378. demo1: https://codepen.io/fellows3/pen/WYBbEM $theme-colors: (
"primary": green
); demo2: https://codepen.io/fellows3/pen/ZmNYNd $primary: green; @MartijnCuppens Any thoughts? |
still not change, if i use $primary: #20bf6b;
$component-active-bg: $primary; but if use $primary: #20bf6b;
$nav-pills-link-active-bg: $primary; its look same with my question above, only different |
I'm not sure how you would overwrite SCSS, but you need to include your custom variables before including bootstrap's SCSS. |
this is how i create my custom theme // 1. core variables and mixins
@import "../bootstrap/functions";
@import "../bootstrap/variables";
@import "../bootstrap/mixins";
// 2. custom core variables
// colors
@import "_partials/colors"; and this is / colors from http://flatuicolors.com/ german pallette
$theme-colors : (
"primary": #20bf6b,
"secondary": #778ca3,
"success": #26de81,
"info": #4b7bec,
"warning": #fed330,
"danger": #fc5c65,
"light": #ffffff,
"dark": #343a40
);
// color body
$body-bg: $white;
$body-color: #423f54;
// $yiq-text-dark: #423f54;
// link colors
$link-color: theme-color("primary");
$link-hover-color: darken($link-color, 15%);
$link-hover-decoration: none;
// component
$component-active-color: $white;
// $component-active-bg: theme-color("primary"); // can't use
$nav-pills-link-active-bg: theme-color("primary");
// dropdown
$dropdown-link-active-bg: theme-color("primary"); is this right?? |
@blackinitial, you'll need to define your variables before including bootstrap. You can read about that here: http://getbootstrap.com/docs/4.1/getting-started/theming/#variable-defaults
|
Ow, and it is also better to change the theme colors here, because these variables are also used later in the variables file: bootstrap/scss/_variables.scss Lines 69 to 76 in c70b043
|
oh ok, i delete $theme-color and use variable $primary etc.. |
i was created custom style bootstrap,
i want to change active bg on nav-pill from blue to green on my theme color.
i try to change var $component-active-bg to theme-color("primary")
$component-active-bg: theme-color("primary");
, but the color not change to green.so i was changed with var
$nav-pills-link-active-bg: theme-color("primary");
and success.is it a bug ??
The text was updated successfully, but these errors were encountered: