MOBILE-4470 styles: Improve combobox and buttons styles
parent
eddcfbe12b
commit
646c3edad0
Binary file not shown.
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 30 KiB |
|
@ -15,6 +15,10 @@
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&::part(container) {
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
&::part(label) {
|
&::part(label) {
|
||||||
position: static;
|
position: static;
|
||||||
}
|
}
|
||||||
|
@ -88,9 +92,16 @@
|
||||||
margin-inline: 0px;
|
margin-inline: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&::part(container) {
|
||||||
|
white-space: normal;
|
||||||
|
@include margin-horizontal(null, 24px);
|
||||||
|
font: var(--mdl-typography-label-font-lg);
|
||||||
|
}
|
||||||
|
|
||||||
&::part(icon) {
|
&::part(icon) {
|
||||||
margin: var(--icon-margin);
|
margin: var(--icon-margin);
|
||||||
opacity: 1;
|
position: absolute;
|
||||||
|
@include position(null, 8px, null, null);
|
||||||
--highlight-color: currentColor;
|
--highlight-color: currentColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,21 +126,16 @@
|
||||||
--color-focused: currentcolor;
|
--color-focused: currentcolor;
|
||||||
--color-hover: currentcolor;
|
--color-hover: currentcolor;
|
||||||
|
|
||||||
border-radius: var(--core-combobox-radius);
|
--border-radius: var(--core-combobox-radius);
|
||||||
margin: 4px 8px;
|
|
||||||
|
|
||||||
flex: 1;
|
|
||||||
|
|
||||||
&::part(native) {
|
|
||||||
font: var(--mdl-typography-label-font-lg);
|
|
||||||
border-radius: var(--core-combobox-radius);
|
|
||||||
}
|
|
||||||
|
|
||||||
.select-text {
|
.select-text {
|
||||||
@include margin-horizontal(null, auto);
|
@include margin-horizontal(null, auto);
|
||||||
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
font: var(--mdl-typography-label-font-lg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sr-only {
|
.sr-only {
|
||||||
@include sr-only();
|
@include sr-only();
|
||||||
}
|
}
|
||||||
|
@ -141,6 +147,10 @@
|
||||||
ion-icon {
|
ion-icon {
|
||||||
margin: var(--icon-margin);
|
margin: var(--icon-margin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.select-icon {
|
||||||
|
color: var(--ion-color-step-500, gray);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<ion-select *ngIf="interface !== 'modal'" class="ion-text-start" [(ngModel)]="selection" (ngModelChange)="onValueChanged(selection)"
|
<ion-select *ngIf="interface !== 'modal'" class="ion-text-start" [(ngModel)]="selection" (ngModelChange)="onValueChanged(selection)"
|
||||||
[interface]="interface" [disabled]="disabled" [class.combobox-icon-only]="icon" [interfaceOptions]="{alignment: 'start', arrow: false}">
|
interface="popover" [disabled]="disabled" [class.combobox-icon-only]="icon"
|
||||||
|
[interfaceOptions]="{alignment: 'start', arrow: false, cssClass: 'core-combobox-select'}">
|
||||||
<div slot="label">
|
<div slot="label">
|
||||||
<span class="sr-only" *ngIf="label">{{ label }}</span>
|
<span class="sr-only" *ngIf="label">{{ label }}</span>
|
||||||
<ion-icon *ngIf="icon" [name]="icon" aria-hidden="true" />
|
<ion-icon *ngIf="icon" [name]="icon" aria-hidden="true" />
|
||||||
|
@ -11,11 +12,13 @@
|
||||||
<ion-button *ngIf="interface === 'modal'" aria-haspopup="listbox" [attr.aria-controls]="listboxId" [attr.aria-owns]="listboxId"
|
<ion-button *ngIf="interface === 'modal'" aria-haspopup="listbox" [attr.aria-controls]="listboxId" [attr.aria-owns]="listboxId"
|
||||||
[attr.aria-expanded]="expanded" (click)="openModal()" [disabled]="disabled" expand="block" role="combobox">
|
[attr.aria-expanded]="expanded" (click)="openModal()" [disabled]="disabled" expand="block" role="combobox">
|
||||||
<ion-icon *ngIf="icon" [name]="icon" slot="start" aria-hidden="true" />
|
<ion-icon *ngIf="icon" [name]="icon" slot="start" aria-hidden="true" />
|
||||||
|
|
||||||
<span class="sr-only" *ngIf="label">{{ label }},</span>
|
<span class="sr-only" *ngIf="label">{{ label }},</span>
|
||||||
<div class="select-text">
|
<div class="select-text">
|
||||||
<slot name="text">{{selection}}</slot>
|
<slot name="text">{{selection}}</slot>
|
||||||
</div>
|
</div>
|
||||||
<div class="select-icon" role="presentation" aria-hidden="true">
|
|
||||||
|
<div class="select-icon" role="presentation" aria-hidden="true" slot="end">
|
||||||
<div class="select-icon-inner"></div>
|
<div class="select-icon-inner"></div>
|
||||||
</div>
|
</div>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
|
|
|
@ -1,6 +1,22 @@
|
||||||
|
|
||||||
ion-button {
|
ion-button {
|
||||||
margin: 4px 8px;
|
margin: var(--mdl-spacing-1) var(--mdl-spacing-2);
|
||||||
|
white-space: normal;
|
||||||
|
line-height: 120%;
|
||||||
|
|
||||||
|
core-format-text {
|
||||||
|
white-space: normal;
|
||||||
|
display: contents;
|
||||||
|
line-height: 120%;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > * {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
ion-spinner {
|
||||||
|
--color: inherit !important;
|
||||||
|
}
|
||||||
|
|
||||||
ion-spinner[slot=start],
|
ion-spinner[slot=start],
|
||||||
img[slot=start] {
|
img[slot=start] {
|
||||||
|
@ -36,36 +52,6 @@ ion-button {
|
||||||
--box-shadow: none;
|
--box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
core-format-text {
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
display: block;
|
|
||||||
line-height: 1.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
> * {
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.ion-text-wrap {
|
|
||||||
white-space: normal;
|
|
||||||
core-format-text {
|
|
||||||
white-space: normal;
|
|
||||||
display: contents;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > * {
|
|
||||||
white-space: normal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ion-spinner {
|
|
||||||
--color: inherit !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.button-has-icon-only {
|
&.button-has-icon-only {
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,4 +16,13 @@ ion-popover {
|
||||||
&.ios {
|
&.ios {
|
||||||
--min-width: 250px;
|
--min-width: 250px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.core-combobox-select {
|
||||||
|
--width: auto;
|
||||||
|
--max-width: 80%;
|
||||||
|
|
||||||
|
ion-radio::part(label) {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ input[type=radio],
|
||||||
}
|
}
|
||||||
|
|
||||||
&::part(mark) {
|
&::part(mark) {
|
||||||
border-radius: var(--inner-border-radius);
|
border-radius: 50%;
|
||||||
width: calc(50% + var(--outer-border-width));
|
width: calc(50% + var(--outer-border-width));
|
||||||
height: calc(50% + var(--outer-border-width));
|
height: calc(50% + var(--outer-border-width));
|
||||||
transform: scale3d(0, 0, 0);
|
transform: scale3d(0, 0, 0);
|
||||||
|
|
|
@ -63,7 +63,7 @@ ion-item.item-input.item-multiple-inputs {
|
||||||
top: auto;
|
top: auto;
|
||||||
left: auto;
|
left: auto;
|
||||||
position: static;
|
position: static;
|
||||||
border-radius: var(--inner-border-radius);
|
border-radius: 50%;
|
||||||
width: calc(50% + var(--outer-border-width));
|
width: calc(50% + var(--outer-border-width));
|
||||||
height: calc(50% + var(--outer-border-width));
|
height: calc(50% + var(--outer-border-width));
|
||||||
transform: scale3d(0, 0, 0);
|
transform: scale3d(0, 0, 0);
|
||||||
|
|
Loading…
Reference in New Issue