mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-10 19:57:13 +03:00
remove variations mixins - no longer used
This commit is contained in:
parent
110c8cae35
commit
8bcbafae9a
|
@ -4,7 +4,6 @@
|
|||
@import "mixins/type";
|
||||
@import "mixins/layout";
|
||||
@import "mixins/drawer";
|
||||
@import "mixins/variations";
|
||||
@import "mixins/forms";
|
||||
@import "mixins/buttons";
|
||||
@import "mixins/hover";
|
||||
|
|
|
@ -1,149 +0,0 @@
|
|||
// variations(unquote(""), background-color, #FFF);
|
||||
@mixin variations($component, $selector-suffix, $bmd-param-1, $color-default) {
|
||||
@include generic-variations($component, $selector-suffix, $color-default, "variations-content", $bmd-param-1);
|
||||
}
|
||||
|
||||
@mixin variations-content($args) {
|
||||
//@debug "#{map-get($args, mixin-name)}{ #{map-get($args, material-param-1)}: #{map-get($args, variation-color)}; }";
|
||||
//@debug "#{inspect($args)}";
|
||||
//@error "break here";
|
||||
#{map-get($args, material-param-1)}: map-get($args, variation-color);
|
||||
}
|
||||
|
||||
// navbar-variations(" label input[type=checkbox]:checked + .toggle:active:after", $brand-primary
|
||||
//@mixin navbar-variations($component, $selector-suffix, $color-default) {
|
||||
// @include generic-variations($component, $selector-suffix, $color-default, "navbar-variations-content", null);
|
||||
//}
|
||||
//
|
||||
//@mixin navbar-variations-content($args){
|
||||
// $variation-color: map-get($args, variation-color);
|
||||
// $variation-color-text: map-get($args, variation-color-text);
|
||||
//
|
||||
// background-color: $variation-color;
|
||||
// color: $variation-color-text;
|
||||
// // deeply defined to override welljumbo class without !impotant need
|
||||
// input.form-control {
|
||||
// @include bmd-input-placeholder {
|
||||
// color: $variation-color-text;
|
||||
// }
|
||||
// }
|
||||
// .dropdown-menu {
|
||||
// border-radius: $border-radius;
|
||||
// li > a {
|
||||
// font-size: $bmd-dropdown-font-size;
|
||||
// padding: 13px 16px;
|
||||
// &:hover,
|
||||
// &:focus {
|
||||
// color: $variation-color;
|
||||
// background-color: $grey-200;
|
||||
// }
|
||||
// }
|
||||
// .active > a {
|
||||
// &:hover,
|
||||
// &:focus {
|
||||
// color: $variation-color-text;
|
||||
// }
|
||||
// background-color: $variation-color;
|
||||
// color: $variation-color-text;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
// interpolation of mixin-name is not allowed evidently, so we statically include based on the mixin-name given
|
||||
@mixin call-variations-content-mixin($args) {
|
||||
$mixin-name: map-get($args, mixin-name);
|
||||
@if $mixin-name == variations-content {
|
||||
@include variations-content($args);
|
||||
} @else if $mixin-name == background-variations-content {
|
||||
@include background-variations-content($args);
|
||||
} @else if $mixin-name == text-variations-content {
|
||||
@include text-variations-content($args);
|
||||
} @else if $mixin-name == button-variations-content {
|
||||
@include button-variations-content($args);
|
||||
} @else if $mixin-name == bg-color-variations-content {
|
||||
@include bg-color-variations-content($args);
|
||||
} @else if $mixin-name == bg-box-shadow-variations-content {
|
||||
@include bg-box-shadow-variations-content($args);
|
||||
} @else if $mixin-name == bg-img-variations-content {
|
||||
@include bg-img-variations-content($args);
|
||||
} @else if $mixin-name == navbar-variations-content {
|
||||
@include navbar-variations-content($args);
|
||||
}@else if $mixin-name == alert-variations-content {
|
||||
@include alert-variations-content($args);
|
||||
} @else {
|
||||
@error "Unknown mixin: #{$mixin-name}"
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// To use this mixin you should pass a function as final parameter to define
|
||||
// the style. In that definition you can use the following variables to define it.
|
||||
//
|
||||
// $variation-color-name ---> "red", "green", "indigo" ...
|
||||
// $variation-color-full-name ---> "red", "green-50", "indigo-400" ...
|
||||
// $variation-color ---> #f44336, #e8f5e9, #5c6bc0 ...
|
||||
// $variation-color-text ---> rgba(255,255,255,0.84), rgba(0,0,0,0.84), rgba(255,255,255,0.84) ...
|
||||
//
|
||||
|
||||
@mixin generic-variations($component, $selector-suffix, $color-default, $mixin-name, $bmd-param-1) {
|
||||
|
||||
//setup map to pass parameters (instead of the incredibly long-error-prone list for each and every @include)
|
||||
$args: (
|
||||
//extra: $selector-suffix,
|
||||
//default: $color-default,
|
||||
mixin-name: $mixin-name,
|
||||
material-param-1: $bmd-param-1
|
||||
);
|
||||
|
||||
// bootstrap styles
|
||||
&#{$component}-secondary#{$selector-suffix} {
|
||||
|
||||
$args-extra: map-merge($args, (
|
||||
variation-color: $color-default,
|
||||
variation-color-text: $bmd-text-color-inverse
|
||||
));
|
||||
@include call-variations-content-mixin($args-extra);
|
||||
}
|
||||
//&#{$component}-inverse#{$selector-suffix} {
|
||||
// $args-inverse: map-merge($args, (
|
||||
// variation-color: $bmd-brand-inverse,
|
||||
// variation-color-text: contrast-color($bmd-brand-inverse, $gray-dark, $bmd-text-color-inverse)
|
||||
// ));
|
||||
// @include call-variations-content-mixin($args-inverse);
|
||||
//}
|
||||
&#{$component}-primary#{$selector-suffix} {
|
||||
$args-primary: map-merge($args, (
|
||||
variation-color: $brand-primary,
|
||||
variation-color-text: $bmd-text-color-inverse
|
||||
));
|
||||
@include call-variations-content-mixin($args-primary);
|
||||
}
|
||||
&#{$component}-success#{$selector-suffix} {
|
||||
$args-success: map-merge($args, (
|
||||
variation-color: $brand-success,
|
||||
variation-color-text: $bmd-text-color-inverse
|
||||
));
|
||||
@include call-variations-content-mixin($args-success);
|
||||
}
|
||||
&#{$component}-info#{$selector-suffix} {
|
||||
$args-info: map-merge($args, (
|
||||
variation-color: $brand-info,
|
||||
variation-color-text: $bmd-text-color-inverse
|
||||
));
|
||||
@include call-variations-content-mixin($args-info);
|
||||
}
|
||||
&#{$component}-warning#{$selector-suffix} {
|
||||
$args-warning: map-merge($args, (
|
||||
variation-color: $brand-warning,
|
||||
variation-color-text: $bmd-text-color-inverse
|
||||
));
|
||||
@include call-variations-content-mixin($args-warning);
|
||||
}
|
||||
&#{$component}-danger#{$selector-suffix} {
|
||||
$args-danger: map-merge($args, (
|
||||
variation-color: $brand-danger,
|
||||
variation-color-text: $bmd-text-color-inverse
|
||||
));
|
||||
@include call-variations-content-mixin($args-danger);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user