mdbootstrap / material-design-for-bootstrap

Important! A new UI Kit version for Bootstrap 5 is available. Access the latest free version via the link below.
https://mdbootstrap.com/docs/standard/
MIT License
9.34k stars 1.15k forks source link

colors.scss ignores custom color setting #29

Closed git-no closed 7 years ago

git-no commented 7 years ago

Colors setting are broken after update to latest MDB release. Scenario: I have a separate custom.scss with variable declarartions, loaded before mdb.scss. Two issues: pre set color variable are ignored and oversteered by MDB.

!default missing

This is how it is (from one item example from _colors.scss):

...
$primary-color: #4285F4;
...

This is it how it shoud be:

...
$primary-color: #4285F4 !default;
...

Variable missing

Also it would be a better approach to set colors by variables. This would simplify changing the colors of an color-variable would change the color allover the color-variable is used. I think this was already in previously releases. Don't know why that approach was dropped.

This is how it is (from one item example from _colors.scss):

...
.primary-color {
    background-color: #4285F4!important;
}
...

This is it how it shoud be

...
.primary-color {
    background-color: $primary-color !important;
}
...
mattonit commented 7 years ago

Thanks for noticing. We'll fix it

git-no commented 7 years ago

Hint: just let

$mdb-color: #45526E;
.mdb-color {
    background-color: #45526E!important;
}

otherwise the file would fail compiling.