mdb-ui-kit/less/_mixins-fullpalette.less

138 lines
4.2 KiB
Plaintext
Raw Normal View History

@import '_mixins-shared.less';
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.
//
// @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
//
.generic-variations(@extra, @default, @func) {
@contrast-factor: 40%;
// bootstrap styles
&@{extra}, &-default@{extra} {
@mdb-color-name: "default";
@mdb-color-full-name: @mdb-color-name;
@mdb-color: @default;
@mdb-text-color: @darkbg-text;
2015-03-09 19:10:44 +03:00
@func();
}
&-black@{extra} {
@mdb-color-name: "black";
@mdb-color-full-name: @mdb-color-name;
@mdb-color: @black;
@mdb-text-color: @darkbg-text;
2015-03-09 19:10:44 +03:00
@func();
}
&-white@{extra} {
@mdb-color-name: "white";
@mdb-color-full-name: @mdb-color-name;
@mdb-color: @white;
@mdb-text-color: @lightbg-text;
2015-03-09 19:10:44 +03:00
@func();
}
&-inverse@{extra} {
@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);
2015-03-09 19:10:44 +03:00
@func();
}
&-primary@{extra} {
@mdb-color-name: "primary";
@mdb-color-full-name: @mdb-color-name;
@mdb-color: @primary;
@mdb-text-color: @darkbg-text;
2015-03-09 19:10:44 +03:00
@func();
}
&-success@{extra} {
@mdb-color-name: "success";
@mdb-color-full-name: @mdb-color-name;
@mdb-color: @success;
@mdb-text-color: @darkbg-text;
2015-03-09 19:10:44 +03:00
@func();
}
&-info@{extra} {
@mdb-color-name: "info";
@mdb-color-full-name: @mdb-color-name;
@mdb-color: @info;
@mdb-text-color: @darkbg-text;
2015-03-09 19:10:44 +03:00
@func();
}
&-warning@{extra} {
@mdb-color-name: "warning";
@mdb-color-full-name: @mdb-color-name;
@mdb-color: @warning;
@mdb-text-color: @darkbg-text;
2015-03-09 19:10:44 +03:00
@func();
}
&-danger@{extra} {
@mdb-color-name: "danger";
@mdb-color-full-name: @mdb-color-name;
@mdb-color: @danger;
@mdb-text-color: @darkbg-text;
2015-03-09 19:10:44 +03:00
@func();
}
// given a color build multiples dephs
.generic-variations-factory(@mdb-color-name) {
2015-03-09 19:10:44 +03:00
// given a color and its deph build css
.generic-variations-factory-deep(@mdb-color-number) {
2015-03-09 19:10:44 +03:00
&-material-@{material-color-name}@{material-color-number}@{extra} {
@mdb-color-full-name: "@{material-color-name}@{material-color-number}";
@mdb-color: @@material-color-full-name;
@mdb-text-color: contrast(@mdb-color, @lightbg-text, @darkbg-text, @contrast-factor);
2015-03-09 19:10:44 +03:00
@func();
}
}
.generic-variations-factory-deep(~"");
.generic-variations-factory-deep(~"-50");
.generic-variations-factory-deep(~"-100");
.generic-variations-factory-deep(~"-200");
.generic-variations-factory-deep(~"-300");
.generic-variations-factory-deep(~"-400");
.generic-variations-factory-deep(~"-500");
.generic-variations-factory-deep(~"-600");
.generic-variations-factory-deep(~"-700");
.generic-variations-factory-deep(~"-800");
.generic-variations-factory-deep(~"-900");
.generic-variations-factory-deep(~"-A100");
.generic-variations-factory-deep(~"-A200");
.generic-variations-factory-deep(~"-A400");
.generic-variations-factory-deep(~"-A700");
}
.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");
}
@all-variations: ~"-default, -primary, -info, -success, -warning, -danger";