2016-06-04 23:06:59 +03:00
|
|
|
@import "../colors";
|
|
|
|
@import "../globals";
|
|
|
|
@import "../mixins";
|
2015-10-20 22:15:21 +03:00
|
|
|
@import "./config";
|
2016-06-04 17:36:17 +03:00
|
|
|
@import "./mixins";
|
2015-10-02 18:39:26 +03:00
|
|
|
|
2016-05-20 20:53:03 +03:00
|
|
|
.button {
|
|
|
|
position: relative;
|
2016-10-08 01:16:51 +03:00
|
|
|
|
|
|
|
> input {
|
|
|
|
position: absolute;
|
2016-10-31 02:19:24 +03:00
|
|
|
top: 0;
|
|
|
|
left:0;
|
2016-10-12 18:04:52 +03:00
|
|
|
z-index: 0;
|
|
|
|
width: 0.1px;
|
|
|
|
height: 0.1px;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
overflow: hidden;
|
|
|
|
opacity: 0;
|
2016-10-08 01:16:51 +03:00
|
|
|
}
|
2016-05-20 20:53:03 +03:00
|
|
|
}
|
|
|
|
|
2015-10-02 18:39:26 +03:00
|
|
|
%button {
|
2015-11-21 14:23:24 +03:00
|
|
|
@include typo-button();
|
2015-10-02 18:39:26 +03:00
|
|
|
position: relative;
|
2016-06-19 22:34:30 +03:00
|
|
|
display: inline-block;
|
2015-10-07 10:56:34 +03:00
|
|
|
height: $button-height;
|
2015-10-02 18:39:26 +03:00
|
|
|
flex-direction: row;
|
2015-11-16 23:55:21 +03:00
|
|
|
align-content: center;
|
2015-10-21 01:48:24 +03:00
|
|
|
align-items: center;
|
2015-11-16 23:55:21 +03:00
|
|
|
justify-content: center;
|
2016-07-17 19:16:13 +03:00
|
|
|
line-height: $button-height;
|
2015-10-02 18:39:26 +03:00
|
|
|
text-align: center;
|
|
|
|
text-decoration: none;
|
|
|
|
white-space: nowrap;
|
|
|
|
cursor: pointer;
|
|
|
|
border: 0;
|
|
|
|
outline: none;
|
2016-04-10 13:20:30 +03:00
|
|
|
transition: box-shadow .2s $animation-curve-fast-out-linear-in, background-color .2s $animation-curve-default, color .2s $animation-curve-default;
|
2015-10-02 18:39:26 +03:00
|
|
|
&::-moz-focus-inner {
|
|
|
|
border: 0;
|
|
|
|
}
|
2015-11-29 14:39:55 +03:00
|
|
|
> span:not([data-react-toolbox="tooltip"]) {
|
2015-11-16 23:55:21 +03:00
|
|
|
display: inline-block;
|
|
|
|
line-height: $button-height;
|
2016-08-10 12:31:07 +03:00
|
|
|
vertical-align: top;
|
2015-11-16 23:55:21 +03:00
|
|
|
}
|
|
|
|
> svg {
|
|
|
|
display: inline-block;
|
|
|
|
width: 1em;
|
2016-04-10 12:39:25 +03:00
|
|
|
height: $button-height;
|
2015-11-25 00:18:00 +03:00
|
|
|
font-size: 120%;
|
2016-08-10 12:31:07 +03:00
|
|
|
vertical-align: top;
|
2015-11-16 23:55:21 +03:00
|
|
|
fill: currentColor;
|
|
|
|
}
|
2015-11-05 20:44:10 +03:00
|
|
|
> * {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
2016-05-16 15:50:26 +03:00
|
|
|
> .rippleWrapper {
|
2015-11-21 16:26:17 +03:00
|
|
|
overflow: hidden;
|
2015-11-15 21:34:09 +03:00
|
|
|
}
|
2015-11-25 00:18:00 +03:00
|
|
|
&[disabled] {
|
|
|
|
color: $button-disabled-text-color;
|
|
|
|
pointer-events: none;
|
|
|
|
cursor: auto;
|
|
|
|
}
|
2015-10-02 18:39:26 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
%squared {
|
2015-10-21 01:48:24 +03:00
|
|
|
min-width: $button-squared-min-width;
|
|
|
|
padding: $button-squared-padding;
|
|
|
|
border-radius: $button-border-radius;
|
2015-10-02 18:39:26 +03:00
|
|
|
.icon {
|
2015-10-21 01:48:24 +03:00
|
|
|
margin-right: $button-squared-icon-margin;
|
2015-10-02 18:39:26 +03:00
|
|
|
font-size: 120%;
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
2015-11-17 23:49:27 +03:00
|
|
|
> svg {
|
|
|
|
margin-right: .5 * $unit;
|
|
|
|
}
|
2015-10-02 18:39:26 +03:00
|
|
|
}
|
|
|
|
|
2015-11-25 00:18:00 +03:00
|
|
|
%solid {
|
|
|
|
&[disabled] {
|
|
|
|
@include shadow-2dp();
|
|
|
|
background-color: $button-disabled-background-color;
|
2015-10-02 18:39:26 +03:00
|
|
|
}
|
2015-11-25 00:18:00 +03:00
|
|
|
&:active {
|
|
|
|
@include shadow-4dp();
|
2015-10-06 23:08:37 +03:00
|
|
|
}
|
2015-11-25 00:18:00 +03:00
|
|
|
&:focus:not(:active) {
|
|
|
|
@include focus-shadow();
|
2015-10-02 18:39:26 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.raised {
|
|
|
|
@extend %button;
|
|
|
|
@extend %squared;
|
2015-11-25 00:18:00 +03:00
|
|
|
@extend %solid;
|
2015-10-02 18:39:26 +03:00
|
|
|
@include shadow-2dp();
|
2015-11-25 00:18:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.flat {
|
|
|
|
@extend %button;
|
|
|
|
@extend %squared;
|
|
|
|
background: transparent;
|
2015-10-02 18:39:26 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.floating {
|
|
|
|
@extend %button;
|
2015-11-25 00:18:00 +03:00
|
|
|
@extend %solid;
|
2015-10-02 18:39:26 +03:00
|
|
|
width: $button-floating-height;
|
|
|
|
height: $button-floating-height;
|
2015-10-21 01:48:24 +03:00
|
|
|
font-size: $button-floating-font-size;
|
2015-10-02 18:39:26 +03:00
|
|
|
border-radius: 50%;
|
2016-04-10 13:20:30 +03:00
|
|
|
box-shadow: 0 1px 1.5px 0 rgba(0, 0, 0, .12), 0 1px 1px 0 rgba(0, 0, 0, .24);
|
2015-10-02 18:39:26 +03:00
|
|
|
.icon {
|
|
|
|
line-height: $button-floating-height;
|
|
|
|
}
|
2016-05-16 15:50:26 +03:00
|
|
|
> .rippleWrapper {
|
2015-11-15 23:42:32 +03:00
|
|
|
border-radius: 50%;
|
|
|
|
}
|
2015-11-25 00:18:00 +03:00
|
|
|
&.mini {
|
|
|
|
width: $button-floating-mini-height;
|
|
|
|
height: $button-floating-mini-height;
|
|
|
|
font-size: $button-floating-mini-font-size;
|
|
|
|
.icon {
|
|
|
|
line-height: $button-floating-mini-height;
|
|
|
|
}
|
|
|
|
}
|
2015-10-02 18:39:26 +03:00
|
|
|
}
|
|
|
|
|
2015-11-24 02:29:02 +03:00
|
|
|
.toggle {
|
|
|
|
@extend %button;
|
|
|
|
width: $button-height;
|
|
|
|
background: transparent;
|
|
|
|
border-radius: 50%;
|
2015-11-25 00:18:00 +03:00
|
|
|
> .icon, svg {
|
2015-11-24 02:29:02 +03:00
|
|
|
font-size: $button-toggle-font-size;
|
|
|
|
line-height: $button-height;
|
2016-08-10 12:31:07 +03:00
|
|
|
vertical-align: top;
|
2015-11-24 02:29:02 +03:00
|
|
|
}
|
2016-05-16 15:50:26 +03:00
|
|
|
> .rippleWrapper {
|
2015-11-24 02:29:02 +03:00
|
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-17 23:49:27 +03:00
|
|
|
.neutral:not([disabled]) {
|
2015-11-28 22:15:26 +03:00
|
|
|
&.raised, &.floating {
|
|
|
|
color: $button-neutral-color-contrast;
|
|
|
|
background-color: $button-neutral-color;
|
|
|
|
}
|
|
|
|
&.flat, &.toggle {
|
|
|
|
color: $button-neutral-color-contrast;
|
|
|
|
&:focus:not(:active) {
|
2015-11-24 02:29:02 +03:00
|
|
|
background: $button-neutral-color-hover;
|
|
|
|
}
|
2015-11-17 23:49:27 +03:00
|
|
|
}
|
2015-11-28 22:15:26 +03:00
|
|
|
&.flat:hover {
|
|
|
|
background: $button-neutral-color-hover;
|
|
|
|
}
|
2015-11-22 09:01:49 +03:00
|
|
|
|
|
|
|
&.inverse {
|
|
|
|
&.raised, &.floating {
|
|
|
|
color: $button-neutral-color;
|
|
|
|
background-color: $button-neutral-color-contrast;
|
2015-11-17 23:49:27 +03:00
|
|
|
}
|
2015-11-22 09:01:49 +03:00
|
|
|
&.flat, &.toggle {
|
|
|
|
color: $button-neutral-color;
|
|
|
|
&:focus:not(:active) {
|
|
|
|
background: $button-neutral-color-hover;
|
|
|
|
}
|
2015-11-17 23:49:27 +03:00
|
|
|
}
|
2015-11-24 02:29:02 +03:00
|
|
|
&.flat:hover {
|
|
|
|
background: $button-neutral-color-hover;
|
|
|
|
}
|
2015-11-17 23:49:27 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-04-10 13:20:30 +03:00
|
|
|
@include btn-colors("primary", $button-primary-color-contrast, $button-primary-color, $button-primary-color-hover);
|
|
|
|
@include btn-colors("accent", $button-accent-color-contrast, $button-accent-color, $button-accent-color-hover);
|