mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
82 lines
2.0 KiB
SCSS
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%;
|
|
}
|