first comit
This commit is contained in:
188
static/scss/material-bootstrap-wizard/mixins/_buttons.scss
Normal file
188
static/scss/material-bootstrap-wizard/mixins/_buttons.scss
Normal file
@@ -0,0 +1,188 @@
|
||||
@mixin btn-styles($btn-color) {
|
||||
|
||||
// remove this line if you want black shadows
|
||||
@include shadow-2dp-color($btn-color);
|
||||
|
||||
&,
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active,
|
||||
&.active,
|
||||
&:active:focus,
|
||||
&:active:hover,
|
||||
&.active:focus,
|
||||
&.active:hover,
|
||||
.open > &.dropdown-toggle,
|
||||
.open > &.dropdown-toggle:focus,
|
||||
.open > &.dropdown-toggle:hover {
|
||||
background-color: $btn-color;
|
||||
color: $white-color;
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&:active,
|
||||
&:hover{
|
||||
// remove this line if you want black shadows
|
||||
@include button-shadow-color($btn-color);
|
||||
}
|
||||
|
||||
&.disabled,
|
||||
&:disabled,
|
||||
&[disabled],
|
||||
fieldset[disabled] & {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus,
|
||||
&.focus,
|
||||
&:active,
|
||||
&.active {
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
&.btn-simple{
|
||||
background-color: transparent;
|
||||
color: $btn-color;
|
||||
box-shadow: none;
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active{
|
||||
background-color: transparent;
|
||||
color: $btn-color;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// for social buttons
|
||||
@mixin social-buttons-color ($color){
|
||||
background-color: $color;
|
||||
color: #fff;
|
||||
@include shadow-2dp-color($color);
|
||||
|
||||
&:focus,
|
||||
&:active,
|
||||
&:hover{
|
||||
background-color: $color;
|
||||
color: #fff;
|
||||
@include button-shadow-color($color);
|
||||
}
|
||||
|
||||
&.btn-simple{
|
||||
color: $color;
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
// 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}"
|
||||
}
|
||||
}
|
||||
|
||||
@mixin generic-variations($component, $selector-suffix, $color-default, $mixin-name, $mdb-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: $mdb-param-1
|
||||
);
|
||||
|
||||
// bootstrap styles
|
||||
&#{$selector-suffix},
|
||||
&#{$component}-default#{$selector-suffix} {
|
||||
|
||||
$args-extra: map-merge($args, (
|
||||
variation-color: $white-color,
|
||||
variation-color-text: $gray
|
||||
));
|
||||
@include call-variations-content-mixin($args-extra);
|
||||
}
|
||||
&#{$component}-inverse#{$selector-suffix} {
|
||||
$args-inverse: map-merge($args, (
|
||||
variation-color: #212121,
|
||||
variation-color-text: #fff
|
||||
));
|
||||
@include call-variations-content-mixin($args-inverse);
|
||||
}
|
||||
&#{$component}-primary#{$selector-suffix} {
|
||||
$args-primary: map-merge($args, (
|
||||
variation-color: $brand-primary,
|
||||
variation-color-text: $mdb-text-color-light
|
||||
));
|
||||
@include call-variations-content-mixin($args-primary);
|
||||
}
|
||||
&#{$component}-success#{$selector-suffix} {
|
||||
$args-success: map-merge($args, (
|
||||
variation-color: $brand-success,
|
||||
variation-color-text: $mdb-text-color-light
|
||||
));
|
||||
@include call-variations-content-mixin($args-success);
|
||||
}
|
||||
&#{$component}-info#{$selector-suffix} {
|
||||
$args-info: map-merge($args, (
|
||||
variation-color: $brand-info,
|
||||
variation-color-text: $mdb-text-color-light
|
||||
));
|
||||
@include call-variations-content-mixin($args-info);
|
||||
}
|
||||
&#{$component}-warning#{$selector-suffix} {
|
||||
$args-warning: map-merge($args, (
|
||||
variation-color: $brand-warning,
|
||||
variation-color-text: $mdb-text-color-light
|
||||
));
|
||||
@include call-variations-content-mixin($args-warning);
|
||||
}
|
||||
&#{$component}-danger#{$selector-suffix} {
|
||||
$args-danger: map-merge($args, (
|
||||
variation-color: $brand-danger,
|
||||
variation-color-text: $mdb-text-color-light
|
||||
));
|
||||
@include call-variations-content-mixin($args-danger);
|
||||
}
|
||||
|
||||
&#{$component}-rose#{$selector-suffix} {
|
||||
$args-rose: map-merge($args, (
|
||||
variation-color: $brand-rose,
|
||||
variation-color-text: $mdb-text-color-light
|
||||
));
|
||||
@include call-variations-content-mixin($args-rose);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@mixin variations($component, $selector-suffix, $mdb-param-1, $color-default) {
|
||||
@include generic-variations($component, $selector-suffix, $color-default, "variations-content", $mdb-param-1);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// Placeholder text
|
||||
@mixin material-placeholder() {
|
||||
&::-moz-placeholder {@content; } // Firefox
|
||||
&:-ms-input-placeholder {@content; } // Internet Explorer 10+
|
||||
&::-webkit-input-placeholder {@content; } // Safari and Chrome
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
@mixin transform-translate-y($value){
|
||||
-webkit-transform: translate3d(0,$value, 0);
|
||||
-moz-transform: translate3d(0, $value, 0);
|
||||
-o-transform: translate3d(0, $value, 0);
|
||||
-ms-transform: translate3d(0, $value, 0);
|
||||
transform: translate3d(0, $value, 0);
|
||||
}
|
||||
|
||||
@mixin transition($time, $type){
|
||||
-webkit-transition: all $time $type;
|
||||
-moz-transition: all $time $type;
|
||||
-o-transition: all $time $type;
|
||||
-ms-transition: all $time $type;
|
||||
transition: all $time $type;
|
||||
}
|
||||
|
||||
@mixin set-wizard-color($color) {
|
||||
.moving-tab{
|
||||
background-color: $color;
|
||||
@include shadow-big-color($color);
|
||||
}
|
||||
|
||||
.picture{
|
||||
&:hover{
|
||||
border-color: $color;
|
||||
}
|
||||
}
|
||||
|
||||
.choice{
|
||||
&:hover,
|
||||
&.active{
|
||||
.icon{
|
||||
border-color: $color;
|
||||
color: $color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-group{
|
||||
.form-control{
|
||||
background-image: linear-gradient($color, $color), linear-gradient($mdb-input-underline-color, $mdb-input-underline-color);
|
||||
}
|
||||
}
|
||||
|
||||
.checkbox input[type=checkbox]:checked + .checkbox-material{
|
||||
.check{
|
||||
background-color: $color;
|
||||
}
|
||||
}
|
||||
|
||||
.radio input[type=radio]:checked ~ .check {
|
||||
background-color: $color;
|
||||
}
|
||||
|
||||
.radio input[type=radio]:checked ~ .circle {
|
||||
border-color: $color;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user