Files
Manu Mtz.-Almeida 97946eed20 refactor(buttons): button-native without prefix
Now we don't need prefix because of shadow-dom
2018-09-25 19:41:26 +02:00

82 lines
2.0 KiB
SCSS

@import "./chip-button.vars";
// Chip Button
// --------------------------------------------------
:host {
/**
* @prop --background: Background of the Chip Button
* @prop --color: Color of the Chip Button
* @prop --border-radius: Border radius of the Chip Button
* @prop --margin-top: Margin top of the Chip Button
* @prop --margin-end: Margin end of the Chip Button
* @prop --margin-bottom: Margin bottom of the Chip Button
* @prop --margin-start: Margin start of the Chip Button
* @prop --width: Width of the Chip Button
* @prop --height: Height of the Chip Button
*/
--border-radius: #{$chip-button-border-radius};
--margin-top: #{$chip-button-margin-top};
--margin-end: #{$chip-button-margin-end};
--margin-bottom: #{$chip-button-margin-bottom};
--margin-start: #{$chip-button-margin-start};
--width: #{$chip-button-width};
--height: #{$chip-button-height};
width: var(--width);
height: var(--height);
font-size: #{$chip-button-font-size};
}
:host(.chip-button-clear) {
--background: transparent;
--color: #{$chip-button-clear-color};
}
:host(.chip-button-solid) {
--background: #{ion-color(primary, base)};
--color: #{ion-color(primary, contrast)};
}
:host(.chip-button-solid.ion-color) .button-native {
background: current-color(base);
color: current-color(contrast);
}
:host(.chip-button-clear.ion-color) .button-native {
background: transparent;
color: current-color(base);
}
.button-native {
@include text-inherit();
@include border-radius(var(--border-radius));
@include margin(var(--margin-top), var(--margin-end), var(--margin-bottom), var(--margin-start));
position: relative;
width: var(--width);
height: var(--height);
border: 0;
outline: none;
background: var(--background);
color: var(--color);
appearance: none;
}
.button-inner {
display: flex;
flex-flow: row nowrap;
flex-shrink: 0;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}