2015-11-10 22:36:15 +03:00
|
|
|
@import '_mixins-shared.less';
|
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-21 17:56:29 +03:00
|
|
|
// @mdb-color-name ---> "red", "green", "indigo" ...
|
|
|
|
// @mdb-color-full-name ---> "red", "green-50", "indigo-400" ...
|
|
|
|
// @mdb-color ---> #f44336, #e8f5e9, #5c6bc0 ...
|
|
|
|
// @mdb-text-color ---> rgba(255,255,255,0.84), rgba(0,0,0,0.84), rgba(255,255,255,0.84) ...
|
2015-03-09 19:10:44 +03:00
|
|
|
//
|
|
|
|
|
2014-12-13 14:26:25 +03:00
|
|
|
|
2014-12-19 21:32:44 +03:00
|
|
|
.generic-variations(@extra, @default, @func) {
|
2014-12-13 14:26:25 +03:00
|
|
|
|
2014-12-19 21:32:44 +03:00
|
|
|
@contrast-factor: 40%;
|
2014-12-13 14:26:25 +03:00
|
|
|
|
|
|
|
// bootstrap styles
|
2014-12-18 15:59:34 +03:00
|
|
|
&@{extra}, &-default@{extra} {
|
2015-11-21 17:56:29 +03:00
|
|
|
@mdb-color-name: "default";
|
|
|
|
@mdb-color-full-name: @mdb-color-name;
|
|
|
|
@mdb-color: @default;
|
|
|
|
@mdb-text-color: @darkbg-text;
|
2014-12-19 21:32:44 +03:00
|
|
|
@func();
|
|
|
|
}
|
|
|
|
&-black@{extra} {
|
2015-11-21 17:56:29 +03:00
|
|
|
@mdb-color-name: "black";
|
|
|
|
@mdb-color-full-name: @mdb-color-name;
|
|
|
|
@mdb-color: @black;
|
|
|
|
@mdb-text-color: @darkbg-text;
|
2014-12-19 21:32:44 +03:00
|
|
|
@func();
|
|
|
|
}
|
|
|
|
&-white@{extra} {
|
2015-11-21 17:56:29 +03:00
|
|
|
@mdb-color-name: "white";
|
|
|
|
@mdb-color-full-name: @mdb-color-name;
|
|
|
|
@mdb-color: @white;
|
|
|
|
@mdb-text-color: @lightbg-text;
|
2014-12-19 21:32:44 +03:00
|
|
|
@func();
|
|
|
|
}
|
|
|
|
&-inverse@{extra} {
|
2015-11-21 17:56:29 +03:00
|
|
|
@mdb-color-name: "inverse";
|
|
|
|
@mdb-color-full-name: @mdb-color-name;
|
|
|
|
@mdb-color: @inverse;
|
|
|
|
@mdb-text-color: contrast(@inverse, @lightbg-text, @darkbg-text, @contrast-factor);
|
2014-12-19 21:32:44 +03:00
|
|
|
@func();
|
2014-12-18 15:59:34 +03:00
|
|
|
}
|
|
|
|
&-primary@{extra} {
|
2015-11-21 17:56:29 +03:00
|
|
|
@mdb-color-name: "primary";
|
|
|
|
@mdb-color-full-name: @mdb-color-name;
|
2015-11-21 19:37:35 +03:00
|
|
|
@mdb-color: @brand-primary;
|
2015-11-21 17:56:29 +03:00
|
|
|
@mdb-text-color: @darkbg-text;
|
2014-12-19 21:32:44 +03:00
|
|
|
@func();
|
2014-12-18 15:59:34 +03:00
|
|
|
}
|
|
|
|
&-success@{extra} {
|
2015-11-21 17:56:29 +03:00
|
|
|
@mdb-color-name: "success";
|
|
|
|
@mdb-color-full-name: @mdb-color-name;
|
2015-11-21 19:37:35 +03:00
|
|
|
@mdb-color: @brand-success;
|
2015-11-21 17:56:29 +03:00
|
|
|
@mdb-text-color: @darkbg-text;
|
2014-12-19 21:32:44 +03:00
|
|
|
@func();
|
2014-12-18 15:59:34 +03:00
|
|
|
}
|
|
|
|
&-info@{extra} {
|
2015-11-21 17:56:29 +03:00
|
|
|
@mdb-color-name: "info";
|
|
|
|
@mdb-color-full-name: @mdb-color-name;
|
2015-11-21 19:37:35 +03:00
|
|
|
@mdb-color: @brand-info;
|
2015-11-21 17:56:29 +03:00
|
|
|
@mdb-text-color: @darkbg-text;
|
2014-12-19 21:32:44 +03:00
|
|
|
@func();
|
2014-12-18 15:59:34 +03:00
|
|
|
}
|
|
|
|
&-warning@{extra} {
|
2015-11-21 17:56:29 +03:00
|
|
|
@mdb-color-name: "warning";
|
|
|
|
@mdb-color-full-name: @mdb-color-name;
|
2015-11-21 19:37:35 +03:00
|
|
|
@mdb-color: @brand-warning;
|
2015-11-21 17:56:29 +03:00
|
|
|
@mdb-text-color: @darkbg-text;
|
2014-12-19 21:32:44 +03:00
|
|
|
@func();
|
2014-12-18 15:59:34 +03:00
|
|
|
}
|
|
|
|
&-danger@{extra} {
|
2015-11-21 17:56:29 +03:00
|
|
|
@mdb-color-name: "danger";
|
|
|
|
@mdb-color-full-name: @mdb-color-name;
|
2015-11-21 19:37:35 +03:00
|
|
|
@mdb-color: @brand-danger;
|
2015-11-21 17:56:29 +03:00
|
|
|
@mdb-text-color: @darkbg-text;
|
2014-12-19 21:32:44 +03:00
|
|
|
@func();
|
2014-12-18 15:59:34 +03:00
|
|
|
}
|
2014-12-13 14:26:25 +03:00
|
|
|
|
|
|
|
// given a color build multiples dephs
|
2015-11-21 17:56:29 +03:00
|
|
|
.generic-variations-factory(@mdb-color-name) {
|
2014-12-13 14:26:25 +03:00
|
|
|
|
|
|
|
// given a color and its deph build css
|
2015-11-21 17:56:29 +03:00
|
|
|
.generic-variations-factory-deep(@mdb-color-number) {
|
2014-12-13 14:26:25 +03:00
|
|
|
|
2015-11-21 19:37:35 +03:00
|
|
|
&-material-@{mdb-color-name}@{mdb-color-number}@{extra} {
|
|
|
|
@mdb-color-full-name: "@{mdb-color-name}@{mdb-color-number}";
|
|
|
|
@mdb-color: @@mdb-color-full-name;
|
2015-11-21 17:56:29 +03:00
|
|
|
@mdb-text-color: contrast(@mdb-color, @lightbg-text, @darkbg-text, @contrast-factor);
|
2014-12-19 21:32:44 +03:00
|
|
|
@func();
|
2014-12-13 14:26:25 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-12-19 21:32:44 +03:00
|
|
|
.generic-variations-factory-deep(~"");
|
|
|
|
}
|
|
|
|
|
|
|
|
.generic-variations-factory(~"red");
|
|
|
|
.generic-variations-factory(~"pink");
|
|
|
|
.generic-variations-factory(~"purple");
|
|
|
|
.generic-variations-factory(~"deep-purple");
|
|
|
|
.generic-variations-factory(~"indigo");
|
|
|
|
.generic-variations-factory(~"blue");
|
|
|
|
.generic-variations-factory(~"light-blue");
|
|
|
|
.generic-variations-factory(~"cyan");
|
|
|
|
.generic-variations-factory(~"teal");
|
|
|
|
.generic-variations-factory(~"green");
|
|
|
|
.generic-variations-factory(~"light-green");
|
|
|
|
.generic-variations-factory(~"lime");
|
|
|
|
.generic-variations-factory(~"yellow");
|
|
|
|
.generic-variations-factory(~"amber");
|
|
|
|
.generic-variations-factory(~"orange");
|
|
|
|
.generic-variations-factory(~"deep-orange");
|
|
|
|
.generic-variations-factory(~"brown");
|
|
|
|
.generic-variations-factory(~"grey");
|
|
|
|
.generic-variations-factory(~"blue-grey");
|
2014-12-13 14:26:25 +03:00
|
|
|
|
2014-12-05 05:35:32 +03:00
|
|
|
}
|
|
|
|
|
2014-12-19 21:32:44 +03:00
|
|
|
|
2014-08-20 14:53:26 +04:00
|
|
|
@all-variations: ~"-default, -primary, -info, -success, -warning, -danger";
|