mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2025-07-27 00:19:50 +03:00
button colors loop
This commit is contained in:
parent
a64a239515
commit
f0596c3d4f
|
@ -103,60 +103,30 @@
|
||||||
@include bmd-flat-button-variant($bmd-btn-color);
|
@include bmd-flat-button-variant($bmd-btn-color);
|
||||||
|
|
||||||
// flat bg with text color variations
|
// flat bg with text color variations
|
||||||
&.btn-primary {
|
@each $color, $value in $theme-colors {
|
||||||
@include bmd-flat-button-variant($btn-primary-bg);
|
&.btn-#{$color} {
|
||||||
|
@include bmd-flat-button-variant($value);
|
||||||
}
|
}
|
||||||
&.btn-secondary {
|
|
||||||
@include bmd-flat-button-variant($btn-secondary-color);
|
|
||||||
}
|
|
||||||
&.btn-info {
|
|
||||||
@include bmd-flat-button-variant($btn-info-bg);
|
|
||||||
}
|
|
||||||
&.btn-success {
|
|
||||||
@include bmd-flat-button-variant($btn-success-bg);
|
|
||||||
}
|
|
||||||
&.btn-warning {
|
|
||||||
@include bmd-flat-button-variant($btn-warning-bg);
|
|
||||||
}
|
|
||||||
&.btn-danger {
|
|
||||||
@include bmd-flat-button-variant($btn-danger-bg);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin bmd-outline-button-color() {
|
@mixin bmd-outline-border() {
|
||||||
&.btn-outline,
|
|
||||||
&.btn-outline-primary,
|
|
||||||
&.btn-outline-secondary,
|
|
||||||
&.btn-outline-info,
|
|
||||||
&.btn-outline-success,
|
|
||||||
&.btn-outline-warning,
|
|
||||||
&.btn-outline-danger {
|
|
||||||
border-color: currentColor;
|
border-color: currentColor;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin bmd-outline-button-color() {
|
||||||
|
&.btn-outline {
|
||||||
|
@include bmd-outline-border();
|
||||||
}
|
}
|
||||||
|
|
||||||
// flat bg with text and border color variations
|
// flat bg with text and border color variations
|
||||||
&.btn-outline {
|
@each $color, $value in $theme-colors {
|
||||||
@include bmd-flat-button-variant($bmd-btn-color, $bmd-btn-color, $bmd-btn-color, $bmd-btn-color);
|
&.btn-outline-#{$color} {
|
||||||
|
@include bmd-outline-border();
|
||||||
|
@include bmd-flat-button-variant($value, $value, $value, $value);
|
||||||
}
|
}
|
||||||
&.btn-outline-primary {
|
|
||||||
@include bmd-flat-button-variant($btn-primary-bg, $btn-primary-bg, $btn-primary-bg, $btn-primary-bg);
|
|
||||||
}
|
|
||||||
&.btn-outline-secondary {
|
|
||||||
@include bmd-flat-button-variant($btn-secondary-color, $btn-secondary-color, $btn-secondary-color, $btn-secondary-color);
|
|
||||||
}
|
|
||||||
&.btn-outline-info {
|
|
||||||
@include bmd-flat-button-variant($btn-info-bg, $btn-info-bg, $btn-info-bg, $btn-info-bg);
|
|
||||||
}
|
|
||||||
&.btn-outline-success {
|
|
||||||
@include bmd-flat-button-variant($btn-success-bg, $btn-success-bg, $btn-success-bg, $btn-success-bg);
|
|
||||||
}
|
|
||||||
&.btn-outline-warning {
|
|
||||||
@include bmd-flat-button-variant($btn-warning-bg, $btn-warning-bg, $btn-warning-bg, $btn-warning-bg);
|
|
||||||
}
|
|
||||||
&.btn-outline-danger {
|
|
||||||
@include bmd-flat-button-variant($btn-danger-bg, $btn-danger-bg, $btn-danger-bg, $btn-danger-bg);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,22 +154,22 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin bmd-raised-button-color() {
|
@mixin bmd-raised-button-color() {
|
||||||
&.btn-primary {
|
@each $color, $value in $theme-colors {
|
||||||
@include bmd-raised-button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border-color);
|
&.btn-#{$color} {
|
||||||
|
@include bmd-raised-button-variant(#fff, $value, $value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin undo-bs-tab-focus() {
|
||||||
|
// clear out the tab-focus() from BS
|
||||||
|
&,
|
||||||
|
&:active,
|
||||||
|
&.active {
|
||||||
|
&:focus,
|
||||||
|
&.focus {
|
||||||
|
//@include tab-focus();
|
||||||
|
outline: 0;
|
||||||
}
|
}
|
||||||
&.btn-secondary {
|
|
||||||
@include bmd-raised-button-variant($btn-secondary-color, $btn-secondary-bg, $btn-secondary-border-color);
|
|
||||||
}
|
|
||||||
&.btn-info {
|
|
||||||
@include bmd-raised-button-variant($btn-info-color, $btn-info-bg, $btn-info-border-color);
|
|
||||||
}
|
|
||||||
&.btn-success {
|
|
||||||
@include bmd-raised-button-variant($btn-success-color, $btn-success-bg, $btn-success-border-color);
|
|
||||||
}
|
|
||||||
&.btn-warning {
|
|
||||||
@include bmd-raised-button-variant($btn-warning-color, $btn-warning-bg, $btn-warning-border-color);
|
|
||||||
}
|
|
||||||
&.btn-danger {
|
|
||||||
@include bmd-raised-button-variant($btn-danger-color, $btn-danger-bg, $btn-danger-border-color);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user