forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 3
/
button.scss
61 lines (47 loc) · 1.37 KB
/
button.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// TODO(jelbourn): Measure perf benefits for translate3d and will-change.
// TODO(jelbourn): Figure out if anchor hover underline actually happens in any browser.
@import "button-base";
// TODO(kara): Replace attribute selectors with class selectors when possible
[md-button] {
@extend %md-button-base;
&:hover, &.md-button-focus {
background-color: md-color($md-foreground, base, 0.12);
@include md-button-theme('background-color', 0.12);
}
&[disabled]:hover {
&.md-primary, &.md-accent, &.md-warn, &:hover {
background-color: transparent;
}
}
}
[md-raised-button] {
@extend %md-raised-button;
}
[md-fab] {
@include md-fab($md-fab-size, $md-fab-padding);
}
[md-mini-fab] {
@include md-fab($md-mini-fab-size, $md-mini-fab-padding)
}
[md-icon-button] {
@extend %md-button-base;
min-width: 0;
padding: 0;
width: $md-icon-button-size;
height: $md-icon-button-size;
line-height: $md-icon-button-line-height;
border-radius: $md-icon-button-border-radius;
&.md-button-focus {
background-color: md-color($md-foreground, base, 0.12);
@include md-button-theme('background-color', 0.12);
}
.md-button-wrapper > * {
vertical-align: middle;
}
}
// Applies a clearer border for high-contrast mode (a11y)
@media screen and (-ms-high-contrast: active) {
.md-raised-button, .md-fab, .md-mini-fab {
border: 1px solid #fff;
}
}