mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
abcc6af54d
Fixed #1636.
75 lines
1.8 KiB
SCSS
75 lines
1.8 KiB
SCSS
// 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], [md-icon-button] {
|
|
@extend %md-button-base;
|
|
|
|
// Only flat buttons and icon buttons (not raised or fabs) have a hover style.
|
|
&:hover {
|
|
// Use the same visual treatment for hover as for focus.
|
|
@include md-button-focus();
|
|
}
|
|
|
|
&[disabled]:hover {
|
|
&.md-primary, &.md-accent, &.md-warn, &::after {
|
|
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-wrapper > * {
|
|
vertical-align: middle;
|
|
}
|
|
}
|
|
|
|
// The ripple container should match the bounds of the entire button.
|
|
.md-button-ripple {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
bottom: 0;
|
|
right: 0;
|
|
}
|
|
|
|
// For round buttons, the ripple container should clip child ripples to a circle.
|
|
.md-button-ripple-round {
|
|
border-radius: 50%;
|
|
// z-index needed to make clipping to border-radius work correctly.
|
|
// http://stackoverflow.com/questions/20001515/chrome-bug-border-radius-not-clipping-contents-when-combined-with-css-transiti
|
|
z-index: 1;
|
|
}
|
|
|
|
// 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;
|
|
}
|
|
}
|