mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2025-07-26 16:09:48 +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);
|
||||
|
||||
// flat bg with text color variations
|
||||
&.btn-primary {
|
||||
@include bmd-flat-button-variant($btn-primary-bg);
|
||||
@each $color, $value in $theme-colors {
|
||||
&.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() {
|
||||
&.btn-outline,
|
||||
&.btn-outline-primary,
|
||||
&.btn-outline-secondary,
|
||||
&.btn-outline-info,
|
||||
&.btn-outline-success,
|
||||
&.btn-outline-warning,
|
||||
&.btn-outline-danger {
|
||||
@mixin bmd-outline-border() {
|
||||
border-color: currentColor;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
@mixin bmd-outline-button-color() {
|
||||
&.btn-outline {
|
||||
@include bmd-outline-border();
|
||||
}
|
||||
|
||||
// flat bg with text and border color variations
|
||||
&.btn-outline {
|
||||
@include bmd-flat-button-variant($bmd-btn-color, $bmd-btn-color, $bmd-btn-color, $bmd-btn-color);
|
||||
@each $color, $value in $theme-colors {
|
||||
&.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() {
|
||||
&.btn-primary {
|
||||
@include bmd-raised-button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border-color);
|
||||
@each $color, $value in $theme-colors {
|
||||
&.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