Files
Brandy Carney 7a8d5f68d2 chore(stylelint): remove sass-lint/scss-lint in favor of stylelint
- remove scss-lint and sass-lint
- add stylelint and stylelint-order packages and configuration
- update all *.scss files to new syntax

fixes #14805
2018-07-19 15:10:30 -05:00

91 lines
2.2 KiB
SCSS

@import "./checkbox";
@import "./checkbox.md.vars";
// Material Design Checkbox
// --------------------------------------------------
:host {
--size: #{$checkbox-md-icon-size};
--border-radius: calc(var(--size) * .125);
--border-width: #{$checkbox-md-icon-border-width};
--border-style: #{$checkbox-md-icon-border-style};
--unchecked-border-color: #{$checkbox-md-icon-border-color-off};
--unchecked-background: #{$checkbox-md-icon-background-color-off};
--transition: #{background $checkbox-md-transition-duration $checkbox-md-transition-easing};
}
// Material Design Checkbox Inner Checkmark: Checked
// -----------------------------------------
:host(.checkbox-checked) .checkbox-inner {
@include position(
calc(var(--size) * .05),
null, null,
calc(var(--size) * .3)
);
position: absolute;
width: calc(var(--size) * .3125);
height: calc(var(--size) * .625);
transform: rotate(45deg);
border-width: calc(var(--size) * .125);
border-top-width: 0;
border-left-width: 0;
border-style: $checkbox-md-icon-checkmark-style;
}
// Material Design Checkbox: Disabled
// -----------------------------------------
// TODO
// .item-md.item-checkbox-disabled ion-label {
:host(.checkbox-disabled) {
opacity: $checkbox-md-disabled-opacity;
pointer-events: none;
}
// Material Design Checkbox Keyboard Focus
// -----------------------------------------
:host(.checkbox-key) .checkbox-icon::after {
@include border-radius(50%);
@include position(-12px, null, null, -12px);
display: block;
position: absolute;
width: 36px;
height: 36px;
background: $checkbox-md-background-color-focused;
content: "";
opacity: .2;
}
// Material Design Checkbox Within An Item
// -----------------------------------------
:host(.in-item) {
@include margin($checkbox-md-item-start-margin-top, $checkbox-md-item-start-margin-end, $checkbox-md-item-start-margin-bottom, $checkbox-md-item-start-margin-start);
display: block;
position: static;
}
:host(.in-item[slot="end"]) {
@include margin($checkbox-md-item-end-margin-top, $checkbox-md-item-end-margin-end, $checkbox-md-item-end-margin-bottom, $checkbox-md-item-end-margin-start);
}
// REVIEW
// .checkbox-md + .item-inner ion-label {
// @include margin-horizontal(0, null);
// }