mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
146 lines
3.5 KiB
SCSS
146 lines
3.5 KiB
SCSS
@import "../../../globals.md";
|
|
@import "../button";
|
|
@import "../button-clear";
|
|
@import "../button-fab";
|
|
@import "../button-icon";
|
|
@import "../button-outline";
|
|
@import "../button-size";
|
|
|
|
// Material Design Button
|
|
// --------------------------------------------------
|
|
|
|
$button-md-font-size: 1.4rem !default;
|
|
$button-md-min-height: 3.6rem !default;
|
|
$button-md-padding: 0 1.1em !default;
|
|
$button-md-box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12) !default;
|
|
$button-md-box-shadow-active: 0 3px 5px rgba(0, 0, 0, 0.14), 0 3px 5px rgba(0, 0, 0, 0.21) !default;
|
|
|
|
$button-md-border-radius: 2px !default;
|
|
$button-md-animation-curve: cubic-bezier(0.4, 0, 0.2, 1) !default;
|
|
$button-md-transition-duration: 300ms !default;
|
|
|
|
$button-md-clear-hover-background-color: rgba(158, 158, 158, 0.1) !default;
|
|
$button-md-clear-active-background-color: rgba(158, 158, 158, 0.2) !default;
|
|
|
|
$button-md-fab-box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.14), 0 4px 5px rgba(0, 0, 0, 0.1) !default;
|
|
$button-md-fab-box-shadow-active: 0 5px 15px 0 rgba(0, 0, 0, 0.4), 0 4px 7px 0 rgba(0, 0, 0, 0.1) !default;
|
|
|
|
|
|
.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 $button-md-transition-duration $button-md-animation-curve,
|
|
background-color $button-md-transition-duration $button-md-animation-curve,
|
|
color $button-md-transition-duration $button-md-animation-curve;
|
|
|
|
&:hover:not(.disable-hover) {
|
|
background-color: $button-md-clear-hover-background-color;
|
|
}
|
|
}
|
|
|
|
.button-full {
|
|
border-radius: 0;
|
|
}
|
|
|
|
.button-round {
|
|
border-radius: $button-round-border-radius;
|
|
padding: $button-round-padding;
|
|
}
|
|
|
|
.button-large {
|
|
padding: 0 $button-large-padding;
|
|
min-height: $button-large-height;
|
|
font-size: $button-large-font-size;
|
|
}
|
|
|
|
.button-small {
|
|
padding: 0 $button-small-padding;
|
|
min-height: $button-small-height;
|
|
font-size: $button-small-font-size;
|
|
}
|
|
|
|
&.activated {
|
|
box-shadow: $button-md-box-shadow-active;
|
|
}
|
|
|
|
.button-fab {
|
|
border-radius: 50%;
|
|
box-shadow: $button-md-fab-box-shadow;
|
|
|
|
&.activated {
|
|
box-shadow: $button-md-fab-box-shadow-active;
|
|
}
|
|
}
|
|
|
|
.button-icon-only {
|
|
padding: 0;
|
|
}
|
|
|
|
.button-outline {
|
|
box-shadow: none;
|
|
|
|
&.activated {
|
|
opacity: 1;
|
|
}
|
|
|
|
md-ripple {
|
|
background: rgba( red($button-color), green($button-color), blue($button-color), 0.1);
|
|
}
|
|
}
|
|
|
|
.button-clear {
|
|
opacity: 1;
|
|
box-shadow: none;
|
|
background: transparent;
|
|
|
|
&.activated {
|
|
opacity: 0.4;
|
|
background-color: $button-md-clear-active-background-color;
|
|
}
|
|
}
|
|
|
|
// Material Design Button Color Mixin
|
|
// --------------------------------------------------
|
|
|
|
@mixin button-theme-md($color-name, $color-value) {
|
|
|
|
.button-#{$color-name}.activated {
|
|
opacity: 1;
|
|
}
|
|
|
|
.button-outline {
|
|
|
|
md-ripple {
|
|
background: rgba( red($color-value), green($color-value), blue($color-value), 0.2);
|
|
}
|
|
|
|
&.activated {
|
|
opacity: 1;
|
|
|
|
md-ripple {
|
|
background: rgba(0, 0, 0, 0.1);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
// Generate Material Design Button Auxiliary Colors
|
|
// --------------------------------------------------
|
|
|
|
@each $color-name, $color-value in $colors {
|
|
|
|
@include button-theme-md($color-name, $color-value);
|
|
|
|
}
|