2015-11-04 23:49:03 +03:00
|
|
|
// This file is NOT automatically converted and must be manually merged
|
2015-11-22 19:23:34 +03:00
|
|
|
@import "mixins-utilities";
|
|
|
|
|
|
|
|
// Placeholder text
|
|
|
|
@mixin material-placeholder() {
|
|
|
|
&::-moz-placeholder {@content; } // Firefox
|
|
|
|
&:-ms-input-placeholder {@content; } // Internet Explorer 10+
|
|
|
|
&::-webkit-input-placeholder {@content; } // Safari and Chrome
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// variations(unquote(""), background-color, #FFF);
|
2015-11-24 02:43:41 +03:00
|
|
|
@mixin variations($component, $selector-suffix, $mdb-param-1, $color-default) {
|
2015-11-25 01:34:17 +03:00
|
|
|
@include generic-variations($component, $selector-suffix, $color-default, "variations-content", $mdb-param-1);
|
2015-11-22 19:23:34 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@mixin variations-content($args) {
|
2015-11-25 01:34:17 +03:00
|
|
|
//@debug "#{map-get($args, mixin-name)}{ #{map-get($args, material-param-1)}: #{map-get($args, variation-color)}; }";
|
2015-11-22 19:23:34 +03:00
|
|
|
//@debug "#{inspect($args)}";
|
|
|
|
//@error "break here";
|
2015-11-25 01:34:17 +03:00
|
|
|
#{map-get($args, material-param-1)}: map-get($args, variation-color);
|
2015-11-22 19:23:34 +03:00
|
|
|
}
|
|
|
|
|
2015-11-24 02:43:41 +03:00
|
|
|
@mixin background-variations($component, $selector-suffix, $color-default) {
|
2015-11-25 01:34:17 +03:00
|
|
|
@include generic-variations($component, $selector-suffix, $color-default, "background-variations-content", null);
|
2015-11-22 19:23:34 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@mixin background-variations-content($args) {
|
2015-11-25 01:34:17 +03:00
|
|
|
background-color: map-get($args, variation-color);
|
|
|
|
@if (map-get($args, variation-color) == $mdb-btn-background-color) {
|
|
|
|
color: $mdb-text-color-primary;
|
2015-11-22 19:23:34 +03:00
|
|
|
} @else {
|
2015-11-25 01:34:17 +03:00
|
|
|
color: map-get($args, variation-color-text);
|
2015-11-22 19:23:34 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-24 02:43:41 +03:00
|
|
|
//@mixin text-variations($component, $selector-suffix, $color-default) {
|
2015-11-25 01:34:17 +03:00
|
|
|
// @include generic-variations($component, $selector-suffix, $color-default, "text-variations-content", null);
|
2015-11-24 02:43:41 +03:00
|
|
|
//}
|
|
|
|
//
|
|
|
|
//@mixin text-variations-content($args) {
|
2015-11-25 01:34:17 +03:00
|
|
|
// color: map-get($args, variation-color);
|
2015-11-24 02:43:41 +03:00
|
|
|
//}
|
|
|
|
//
|
|
|
|
//@mixin button-variations($component, $selector-suffix, $color-default, $mdb-param-1) {
|
2015-11-25 01:34:17 +03:00
|
|
|
// @include generic-variations($component, $selector-suffix, $color-default, "button-variations-content", $mdb-param-1);
|
2015-11-24 02:43:41 +03:00
|
|
|
//}
|
|
|
|
//
|
|
|
|
//@mixin button-variations-content($args) {
|
|
|
|
// //@debug "#{inspect($args)}";
|
2015-11-25 01:34:17 +03:00
|
|
|
// $variation-color: map-get($args, variation-color);
|
2015-11-24 02:43:41 +03:00
|
|
|
// $mdb-param-1: map-get($args, material-param-1);
|
|
|
|
// background-color: contrast-color($variation-color,
|
|
|
|
// darken($variation-color, $mdb-param-1),
|
|
|
|
// lighten($variation-color, $mdb-param-1));
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//@mixin bg-color-variations($component, $selector-suffix, $color-default, $mdb-param-1) {
|
2015-11-25 01:34:17 +03:00
|
|
|
// @include generic-variations($component, $selector-suffix, $color-default, "bg-color-variations-content", $mdb-param-1);
|
2015-11-24 02:43:41 +03:00
|
|
|
//}
|
|
|
|
//
|
|
|
|
//@mixin bg-color-variations-content($args) {
|
2015-11-25 01:34:17 +03:00
|
|
|
// background-color: rgba(map-get($args, variation-color), map-get($args, material-param-1));
|
2015-11-24 02:43:41 +03:00
|
|
|
//}
|
|
|
|
//
|
|
|
|
//// bg-box-shadow-variations(" label input[type=checkbox]:checked + .toggle:active:after", $brand-primary
|
|
|
|
//@mixin bg-box-shadow-variations($component, $selector-suffix, $color-default) {
|
2015-11-25 01:34:17 +03:00
|
|
|
// @include generic-variations($component, $selector-suffix, $color-default, "bg-box-shadow-variations-content", null);
|
2015-11-24 02:43:41 +03:00
|
|
|
//}
|
|
|
|
//
|
|
|
|
//@mixin bg-box-shadow-variations-content($args){
|
2015-11-25 01:34:17 +03:00
|
|
|
// $variation-color: map-get($args, variation-color);
|
2015-11-24 02:43:41 +03:00
|
|
|
// box-shadow: 0 1px 3px 1px rgba(0,0,0,0.4), 0 0 0 15px rgba($variation-color, (10/100));
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//// bg-img-variations(" label input[type=checkbox]:checked + .toggle:active:after", $brand-primary
|
|
|
|
//@mixin bg-img-variations($component, $selector-suffix, $color-default) {
|
2015-11-25 01:34:17 +03:00
|
|
|
// @include generic-variations($component, $selector-suffix, $color-default, "bg-img-variations-content", null);
|
2015-11-24 02:43:41 +03:00
|
|
|
//}
|
|
|
|
//
|
|
|
|
//@mixin bg-img-variations-content($args){
|
2015-11-25 01:34:17 +03:00
|
|
|
// $variation-color: map-get($args, variation-color);
|
|
|
|
// //@debug "bg-img-variations-content called for #{map-get($args, extra)} #{map-get($args, default)} #{map-get($args, variation-color-name)} #{map-get($args, variation-color)}"; //#{inspect($args)}";
|
2015-11-24 02:43:41 +03:00
|
|
|
// background-image: linear-gradient($variation-color, $variation-color), linear-gradient($mdb-input-underline-color, $mdb-input-underline-color);
|
|
|
|
//}
|
2015-11-22 19:23:34 +03:00
|
|
|
|
|
|
|
// navbar-variations(" label input[type=checkbox]:checked + .toggle:active:after", $brand-primary
|
2015-11-24 02:43:41 +03:00
|
|
|
@mixin navbar-variations($component, $selector-suffix, $color-default) {
|
2015-11-25 01:34:17 +03:00
|
|
|
@include generic-variations($component, $selector-suffix, $color-default, "navbar-variations-content", null);
|
2015-11-22 19:23:34 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@mixin navbar-variations-content($args){
|
2015-11-25 01:34:17 +03:00
|
|
|
$variation-color: map-get($args, variation-color);
|
|
|
|
$variation-color-text: map-get($args, variation-color-text);
|
2015-11-22 19:23:34 +03:00
|
|
|
|
2015-11-24 02:43:41 +03:00
|
|
|
background-color: $variation-color;
|
|
|
|
color: $variation-color-text;
|
2015-11-22 19:23:34 +03:00
|
|
|
// deeply defined to override welljumbo class without !impotant need
|
2015-11-24 02:43:41 +03:00
|
|
|
.navbar-form .form-group input.form-control,
|
|
|
|
.navbar-form input.form-control {
|
|
|
|
@include material-placeholder {
|
|
|
|
color: $variation-color-text;
|
|
|
|
}
|
2015-11-22 19:23:34 +03:00
|
|
|
}
|
|
|
|
.dropdown-menu {
|
2015-11-25 01:34:17 +03:00
|
|
|
border-radius: $border-radius-base;
|
2015-11-22 19:23:34 +03:00
|
|
|
li > a {
|
|
|
|
font-size: $mdb-dropdown-font-size;
|
|
|
|
padding: 13px 16px;
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2015-11-24 02:43:41 +03:00
|
|
|
color: $variation-color;
|
2015-11-22 19:23:34 +03:00
|
|
|
background-color: $grey-200;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.active > a {
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2015-11-24 02:43:41 +03:00
|
|
|
color: $variation-color-text;
|
2015-11-22 19:23:34 +03:00
|
|
|
}
|
2015-11-24 02:43:41 +03:00
|
|
|
background-color: $variation-color;
|
|
|
|
color: $variation-color-text;
|
2015-11-22 19:23:34 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// alert-variations("", $brand-primary)
|
2015-11-24 02:43:41 +03:00
|
|
|
@mixin alert-variations($component, $selector-suffix, $color-default) {
|
|
|
|
@include generic-variations($component, $selector-suffix, $color-default, "alert-variations-content", null);
|
2015-11-22 19:23:34 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@mixin alert-variations-content($args){
|
2015-11-25 01:34:17 +03:00
|
|
|
$variation-color: map-get($args, variation-color);
|
|
|
|
$variation-color-text: map-get($args, variation-color-text);
|
2015-11-22 19:23:34 +03:00
|
|
|
|
2015-11-24 02:43:41 +03:00
|
|
|
background-color: $variation-color;
|
|
|
|
color: $variation-color-text;
|
2015-11-22 19:23:34 +03:00
|
|
|
|
|
|
|
a, .alert-link {
|
2015-11-24 02:43:41 +03:00
|
|
|
color: $variation-color-text;
|
2015-11-22 19:23:34 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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.
|
|
|
|
//
|
2015-11-24 02:43:41 +03:00
|
|
|
// $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) ...
|
2015-11-22 19:23:34 +03:00
|
|
|
//
|
|
|
|
|
2015-11-24 02:43:41 +03:00
|
|
|
@mixin generic-variations($component, $selector-suffix, $color-default, $mixin-name, $mdb-param-1) {
|
2015-11-22 19:23:34 +03:00
|
|
|
|
|
|
|
//setup map to pass parameters (instead of the incredibly long-error-prone list for each and every @include)
|
|
|
|
$args: (
|
2015-11-24 02:43:41 +03:00
|
|
|
//extra: $selector-suffix,
|
|
|
|
//default: $color-default,
|
2015-11-22 19:23:34 +03:00
|
|
|
mixin-name: $mixin-name,
|
|
|
|
material-param-1: $mdb-param-1
|
2015-11-04 21:03:16 +03:00
|
|
|
);
|
|
|
|
|
2015-11-22 19:23:34 +03:00
|
|
|
// bootstrap styles
|
2015-11-24 20:33:04 +03:00
|
|
|
&#{$selector-suffix},
|
2015-11-24 02:43:41 +03:00
|
|
|
&#{$component}-default#{$selector-suffix} {
|
2015-11-04 19:57:10 +03:00
|
|
|
|
2015-11-22 19:23:34 +03:00
|
|
|
$args-extra: map-merge($args, (
|
2015-11-25 01:34:17 +03:00
|
|
|
variation-color: $color-default,
|
|
|
|
variation-color-text: $mdb-text-color-light
|
2015-11-22 19:23:34 +03:00
|
|
|
));
|
|
|
|
@include call-variations-content-mixin($args-extra);
|
|
|
|
}
|
2015-11-24 02:43:41 +03:00
|
|
|
&#{$component}-inverse#{$selector-suffix} {
|
2015-11-22 19:23:34 +03:00
|
|
|
$args-inverse: map-merge($args, (
|
2015-11-25 01:34:17 +03:00
|
|
|
variation-color: $mdb-brand-inverse,
|
|
|
|
variation-color-text: contrast-color($mdb-brand-inverse, $mdb-text-color-primary-hex, $mdb-text-color-light-hex)
|
2015-11-22 19:23:34 +03:00
|
|
|
));
|
|
|
|
@include call-variations-content-mixin($args-inverse);
|
|
|
|
}
|
2015-11-24 02:43:41 +03:00
|
|
|
&#{$component}-primary#{$selector-suffix} {
|
2015-11-22 19:23:34 +03:00
|
|
|
$args-primary: map-merge($args, (
|
2015-11-25 01:34:17 +03:00
|
|
|
variation-color: $brand-primary,
|
|
|
|
variation-color-text: $mdb-text-color-light
|
2015-11-22 19:23:34 +03:00
|
|
|
));
|
|
|
|
@include call-variations-content-mixin($args-primary);
|
|
|
|
}
|
2015-11-24 02:43:41 +03:00
|
|
|
&#{$component}-success#{$selector-suffix} {
|
2015-11-22 19:23:34 +03:00
|
|
|
$args-success: map-merge($args, (
|
2015-11-25 01:34:17 +03:00
|
|
|
variation-color: $brand-success,
|
|
|
|
variation-color-text: $mdb-text-color-light
|
2015-11-22 19:23:34 +03:00
|
|
|
));
|
|
|
|
@include call-variations-content-mixin($args-success);
|
|
|
|
}
|
2015-11-24 02:43:41 +03:00
|
|
|
&#{$component}-info#{$selector-suffix} {
|
2015-11-22 19:23:34 +03:00
|
|
|
$args-info: map-merge($args, (
|
2015-11-25 01:34:17 +03:00
|
|
|
variation-color: $brand-info,
|
|
|
|
variation-color-text: $mdb-text-color-light
|
2015-11-22 19:23:34 +03:00
|
|
|
));
|
|
|
|
@include call-variations-content-mixin($args-info);
|
|
|
|
}
|
2015-11-24 02:43:41 +03:00
|
|
|
&#{$component}-warning#{$selector-suffix} {
|
2015-11-22 19:23:34 +03:00
|
|
|
$args-warning: map-merge($args, (
|
2015-11-25 01:34:17 +03:00
|
|
|
variation-color: $brand-warning,
|
|
|
|
variation-color-text: $mdb-text-color-light
|
2015-11-22 19:23:34 +03:00
|
|
|
));
|
|
|
|
@include call-variations-content-mixin($args-warning);
|
|
|
|
}
|
2015-11-24 02:43:41 +03:00
|
|
|
&#{$component}-danger#{$selector-suffix} {
|
2015-11-22 19:23:34 +03:00
|
|
|
$args-danger: map-merge($args, (
|
2015-11-25 01:34:17 +03:00
|
|
|
variation-color: $brand-danger,
|
|
|
|
variation-color-text: $mdb-text-color-light
|
2015-11-22 19:23:34 +03:00
|
|
|
));
|
|
|
|
@include call-variations-content-mixin($args-danger);
|
2015-11-03 17:21:39 +03:00
|
|
|
}
|
2014-10-08 16:52:08 +04:00
|
|
|
}
|