2015-11-22 19:23:34 +03:00
|
|
|
// Placeholder text
|
|
|
|
.material-placeholder(@rules) {
|
|
|
|
&::-moz-placeholder { @rules(); } // Firefox
|
|
|
|
&:-ms-input-placeholder { @rules(); } // Internet Explorer 10+
|
|
|
|
&::-webkit-input-placeholder { @rules(); } // Safari and Chrome
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// usage: .variations(~" .check", color, transparent);
|
2015-11-24 02:43:41 +03:00
|
|
|
.variations(@component, @selector-suffix, @property, @color-default) {
|
|
|
|
.generic-variations(@component, @selector-suffix, @color-default, {
|
|
|
|
@{property}: @variation-color;
|
2015-11-22 19:23:34 +03:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-24 02:43:41 +03:00
|
|
|
.background-variations(@component, @selector-suffix, @color-default) {
|
|
|
|
.generic-variations(@component, @selector-suffix, @color-default, {
|
|
|
|
background-color: @variation-color;
|
|
|
|
& when (@variation-color = @mdb-btn-background-color) {
|
|
|
|
color: @mdb-text-color-primary;
|
2015-11-22 19:23:34 +03:00
|
|
|
}
|
2015-11-24 02:43:41 +03:00
|
|
|
& when not (@variation-color = @mdb-btn-background-color) {
|
|
|
|
color: @variation-color-text;
|
2015-11-22 19:23:34 +03:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2015-11-24 02:43:41 +03:00
|
|
|
.text-variations(@component, @selector-suffix, @color-default) {
|
|
|
|
.generic-variations(@component, @selector-suffix, @color-default, {
|
|
|
|
color: @variation-color;
|
2015-11-22 19:23:34 +03:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-12-13 14:26:25 +03:00
|
|
|
|
2015-03-09 19:10:44 +03:00
|
|
|
//
|
|
|
|
// 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
|
|
|
// @component: ~".btn" - one of the bs components that have -default, -danger, etc.
|
|
|
|
// @variation-color
|
|
|
|
// @variation-color-text
|
2015-03-09 19:10:44 +03:00
|
|
|
//
|
2015-11-24 02:43:41 +03:00
|
|
|
.generic-variations(@component, @selector-suffix, @color-default, @func) {
|
2014-12-19 21:32:44 +03:00
|
|
|
@contrast-factor: 40%;
|
2014-12-13 14:26:25 +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} {
|
|
|
|
@variation-color: @color-default;
|
|
|
|
@variation-color-text: @mdb-text-color-light;
|
2014-12-19 21:32:44 +03:00
|
|
|
@func();
|
|
|
|
}
|
2015-11-24 02:43:41 +03:00
|
|
|
&@{component}-inverse@{selector-suffix} {
|
|
|
|
@variation-color: @mdb-brand-inverse;
|
|
|
|
//@variation-color-text: contrast(@mdb-brand-inverse, @mdb-text-color-primary, @mdb-text-color-light, @contrast-factor);
|
|
|
|
@variation-color-text: contrast(@mdb-brand-inverse, @mdb-text-color-primary-hex, @mdb-text-color-light-hex, @contrast-factor);
|
2014-12-19 21:32:44 +03:00
|
|
|
@func();
|
2014-12-18 15:59:34 +03:00
|
|
|
}
|
2015-11-24 02:43:41 +03:00
|
|
|
&@{component}-primary@{selector-suffix} {
|
|
|
|
@variation-color: @brand-primary;
|
|
|
|
@variation-color-text: @mdb-text-color-light;
|
2014-12-19 21:32:44 +03:00
|
|
|
@func();
|
2014-12-18 15:59:34 +03:00
|
|
|
}
|
2015-11-24 02:43:41 +03:00
|
|
|
&@{component}-success@{selector-suffix} {
|
|
|
|
@variation-color: @brand-success;
|
|
|
|
@variation-color-text: @mdb-text-color-light;
|
2014-12-19 21:32:44 +03:00
|
|
|
@func();
|
2014-12-18 15:59:34 +03:00
|
|
|
}
|
2015-11-24 02:43:41 +03:00
|
|
|
&@{component}-info@{selector-suffix} {
|
|
|
|
@variation-color: @brand-info;
|
|
|
|
@variation-color-text: @mdb-text-color-light;
|
2014-12-19 21:32:44 +03:00
|
|
|
@func();
|
2014-12-18 15:59:34 +03:00
|
|
|
}
|
2015-11-24 02:43:41 +03:00
|
|
|
&@{component}-warning@{selector-suffix} {
|
|
|
|
@variation-color: @brand-warning;
|
|
|
|
@variation-color-text: @mdb-text-color-light;
|
2014-12-19 21:32:44 +03:00
|
|
|
@func();
|
2014-12-18 15:59:34 +03:00
|
|
|
}
|
2015-11-24 02:43:41 +03:00
|
|
|
&@{component}-danger@{selector-suffix} {
|
|
|
|
@variation-color: @brand-danger;
|
|
|
|
@variation-color-text: @mdb-text-color-light;
|
2014-12-19 21:32:44 +03:00
|
|
|
@func();
|
2014-12-18 15:59:34 +03:00
|
|
|
}
|
2014-12-05 05:35:32 +03:00
|
|
|
}
|