Vmeda.Online/src/core/components/combobox/combobox.scss

138 lines
3.2 KiB
SCSS
Raw Normal View History

@use "theme/globals" as *;
:host {
max-width: 100%;
display: block;
@include margin-horizontal(var(--ion-safe-area-left), var(--ion-safe-area-right));
2024-01-11 11:56:17 +00:00
&.no-border {
--core-combobox-border-width: 0px;
ion-select.combobox-icon-only {
--padding-start: 8px;
&::part(icon) {
display: none;
}
&::part(label) {
position: static;
}
ion-icon {
margin: var(--icon-margin);
font-size: 20px;
}
}
}
ion-select,
ion-button {
--icon-margin: 0 4px;
2024-01-11 11:56:17 +00:00
--background: var(--core-combobox-background);
2021-07-07 13:24:16 +00:00
--border-color: var(--core-combobox-border-color);
--border-style: solid;
--border-width: var(--core-combobox-border-width);
2024-01-11 11:56:17 +00:00
--border-radius: var(--core-combobox-radius);
2021-07-07 13:24:16 +00:00
--box-shadow: var(--core-combobox-box-shadow);
2024-01-11 11:56:17 +00:00
--padding-start: 16px;
--padding-end: 8px;
2024-01-11 11:56:17 +00:00
--padding-top: 8px;
--padding-bottom: 8px;
2024-01-11 11:56:17 +00:00
background: var(--background);
color: var(--color);
text-overflow: ellipsis;
white-space: nowrap;
min-height: var(--a11y-min-target-size);
overflow: hidden;
box-shadow: var(--box-shadow);
2024-01-11 11:56:17 +00:00
&:focus,
&:focus-within {
@include core-focus-style();
}
}
ion-select {
2024-01-11 11:56:17 +00:00
border-color: var(--border-color);
border-style: var(--border-style);
border-width: var(--border-width);
border-radius: var(--core-combobox-radius);
margin: 8px;
2024-01-11 11:56:17 +00:00
&.combobox-icon-only {
&::part(text) {
display: none;
}
}
2024-01-11 11:56:17 +00:00
&::part(label) {
position: absolute;
margin-inline: 0px;
}
2024-01-11 11:56:17 +00:00
&::part(icon) {
margin: var(--icon-margin);
opacity: 1;
}
}
2024-01-11 11:56:17 +00:00
ion-button {
--color: var(--core-combobox-color);
--color-activated: var(--core-combobox-color);
--color-focused: currentcolor;
--color-hover: currentcolor;
2024-01-11 11:56:17 +00:00
--background-hover: black;
--background-activated: black;
--background-focused: black;
--background-hover-opacity: .04;
2024-01-11 11:56:17 +00:00
&.md {
--background-activated-opacity: 0;
--background-focused-opacity: .12;
}
2024-01-11 11:56:17 +00:00
&.ios {
--background-activated-opacity: .12;
--background-focused-opacity: .15;
}
2024-01-11 11:56:17 +00:00
border-radius: var(--core-combobox-radius);
margin: 4px 8px;
2024-01-11 11:56:17 +00:00
flex: 1;
2024-01-11 11:56:17 +00:00
&::part(native) {
font-weight: var(--label-font-weight);
font-size: var(--label-lg-font-size);
line-height: var(--label-lg-line-height);
2024-01-11 11:56:17 +00:00
border-radius: var(--core-combobox-radius);
}
2024-01-11 11:56:17 +00:00
.select-text {
@include margin-horizontal(null, auto);
overflow: hidden;
text-overflow: ellipsis;
}
.sr-only {
@include sr-only();
}
2024-01-11 11:56:17 +00:00
&.ion-activated {
--color: var(--color-activated);
}
2024-01-11 11:56:17 +00:00
ion-icon {
margin: var(--icon-margin);
}
}
2024-01-11 11:56:17 +00:00
}