Files
2015-08-12 10:18:22 -05:00

130 lines
3.0 KiB
SCSS

// Material Design Button
// --------------------------------------------------
$button-md-font-size: 1.4rem !default;
$button-md-min-height: 3.6rem !default;
$button-md-padding: 0 1.6rem !default;
$button-md-box-shadow: 0 1px 1.5px 0 rgba(0, 0, 0, 0.12),0 1px 1px 0 rgba(0, 0, 0, 0.24);//0 1px 3px 0 rgba(0, 0, 0, 0.3); //0 2px 5px 0 rgba(0, 0, 0, 0.26) !default;
$button-md-box-shadow-active: 0 4px 5px 0 rgba(0, 0, 0, 0.14),0 1px 10px 0 rgba(0, 0, 0, 0.12),0 2px 4px -1px rgba(0, 0, 0, 0.2); //0 1px 3px 0 rgba(0, 0, 0, 0.3); //0 2px 5px 0 rgba(0, 0, 0, 0.26) !default;
$button-md-border-radius: 3px !default;
[mode=md] button,
[mode=md] [button] {
border-radius: $button-md-border-radius;
min-height: $button-md-min-height;
padding: $button-md-padding;
text-transform: uppercase;
font-weight: 500;
font-size: $button-md-font-size;
box-shadow: $button-md-box-shadow;
transition: box-shadow 0.2s $animation-curve-fast-out-linear-in,
background-color 0.2s $animation-curve-default,
color 0.2s $animation-curve-default;
&.activated {
box-shadow: $button-md-box-shadow-active;
}
&[full] {
border-radius: 0;
}
&[clear],
&[outline] {
box-shadow: none;
/*.md-ripple {
&.is-visible {
opacity: 0.2;
}
}*/
}
&[round] {
border-radius: $button-round-border-radius;
padding: $button-round-padding;
}
&[large] {
padding: 0 $button-large-padding;
min-width: ($button-large-padding * 4);
min-height: $button-large-height;
font-size: $button-large-font-size;
}
&[small] {
padding: 0 $button-small-padding;
min-width: ($button-small-padding * 3);
min-height: $button-small-height;
font-size: $button-small-font-size;
}
&[fab] {
border-radius: 50%;
}
// Generate iOS Checkbox Auxiliary Colors
// --------------------------------------------------
@each $color, $value in {
&[#{$color}] {
@if lightness(get-color($color, base)) < 80 {
.md-ripple {
//background-color: white;
}
}
&.activated {
opacity: 1;
//background-color: get-color($color, base);
}
&[outline] {
@if lightness(get-color($color, base)) >= 80 {
.md-ripple {
//background-color: black;
}
} @else {
.md-ripple {
//background-color: get-color($color, base);
}
}
&.activated {
@if lightness(get-color($color, base)) > 90 {
$fg-color: get-color($color, inverse);
} @else {
$fg-color: get-color($color, base);
}
opacity: 1;
//background: transparent;
//color: $fg-color;
}
}
&[clear] {
box-shadow: none;
&:hover,
&.hover {
//background-color: rgba(158, 158, 158, 0.1);
}
&.activated {
//background-color: rgba(158, 158, 158, 0.2);
}
}
}
}
}