1+ @use " ../../themes/mixins" as mixins ;
12@import " ./select.vars" ;
23
34// Select
3132 --padding-bottom : 0px ;
3233 --padding-start : 0px ;
3334 --placeholder-color : currentColor ;
34- --placeholder-opacity : #{$placeholder-opacity } ;
3535 --background : transparent ;
3636 --border-style : solid ;
3737 --highlight-color-focused : #{ion-color (primary , base )} ;
5252 width : 100% ;
5353 min-height : 44px ;
5454
55- font-family : $font-family-base ;
56-
5755 white-space : nowrap ;
5856
5957 cursor : pointer ;
60- z-index : $z-index-item-input ;
6158}
6259
6360/* *
115112}
116113
117114button {
118- @include visually-hidden ();
115+ @include mixins . visually-hidden ();
119116}
120117
121118// Select Icon
122119// --------------------------------------------------
123120
124121.select-icon {
125- @include margin (0 , 0 , 0 , $select-icon-margin-start );
126-
127- position : relative ;
128-
129122 /* *
130123 * Prevent the icon from shrinking when the label and/or
131124 * selected item text is long enough to fill the rest of
@@ -143,18 +136,6 @@ button {
143136 color : inherit ;
144137}
145138
146- /* *
147- * The select icon should be centered with
148- * the entire container not just the control
149- * with floating/stacked labels.
150- */
151- :host (.select-label-placement-stacked ) .select-icon ,
152- :host (.select-label-placement-floating ) .select-icon {
153- position : absolute ;
154-
155- height : 100% ;
156- }
157-
158139/* *
159140 * This positions the icon at the correct
160141 * edge of the component with LTR and RTL
@@ -193,9 +174,6 @@ button {
193174// --------------------------------------------------
194175
195176.select-wrapper {
196- @include padding (var (--padding-top ), var (--padding-end ), var (--padding-bottom ), var (--padding-start ));
197- @include border-radius (var (--border-radius ));
198-
199177 display : flex ;
200178
201179 position : relative ;
@@ -389,15 +367,6 @@ button {
389367 flex-direction : row ;
390368}
391369
392- :host (.select-label-placement-start ) .label-text-wrapper {
393- /* *
394- * The margin between the label and
395- * the select should be on the end
396- * when the label sits at the start.
397- */
398- @include margin (0 , $form-control-label-margin , 0 , 0 );
399- }
400-
401370// Select Label Placement - End
402371// ----------------------------------------------------------------
403372
@@ -409,27 +378,6 @@ button {
409378 flex-direction : row-reverse ;
410379}
411380
412- /* *
413- * The margin between the label and
414- * the select should be on the start
415- * when the label sits at the end.
416- */
417- :host (.select-label-placement-end ) .label-text-wrapper {
418- @include margin (0 , 0 , 0 , $form-control-label-margin );
419- }
420-
421- // Select Label Placement - Fixed
422- // ----------------------------------------------------------------
423-
424- :host (.select-label-placement-fixed ) .label-text-wrapper {
425- /* *
426- * The margin between the label and
427- * the select should be on the end
428- * when the label sits at the start.
429- */
430- @include margin (0 , $form-control-label-margin , 0 , 0 );
431- }
432-
433381/* *
434382 * Label is on the left of the select in LTR and
435383 * on the right in RTL. Label also has a fixed width.
@@ -488,28 +436,11 @@ button {
488436 */
489437:host (.select-label-placement-stacked ) .native-wrapper ,
490438:host (.select-label-placement-floating ) .native-wrapper {
491- @include margin (1px , 0 , 0 , 0 );
492-
493439 flex-grow : 1 ;
494440
495441 width : 100% ;
496442}
497443
498- /* *
499- * This makes the label sit over the select
500- * when the select is blurred and has no value.
501- * The label should not sit over the select if the
502- * select has a placeholder.
503- * Note: This is different from what ion-input does
504- * because the activating the select causes an overlay
505- * to appear. This makes it hard to read the placeholder.
506- * With ion-input, the input just focuses and the placeholder
507- * is still easy to read.
508- */
509- :host (.select-label-placement-floating ) .label-text-wrapper {
510- @include transform (translateY (100% ), scale (1 ));
511- }
512-
513444/* *
514445 * The placeholder should be hidden when the label
515446 * is on top of the select. This prevents the label
@@ -537,19 +468,6 @@ button {
537468 opacity : 1 ;
538469}
539470
540- /* *
541- * This makes the label sit above the input.
542- */
543- :host (.label-floating ) .label-text-wrapper {
544- @include transform (translateY (50% ), scale (#{$form-control-label-stacked-scale } ));
545-
546- /* *
547- * Label text should not extend
548- * beyond the bounds of the input.
549- */
550- max-width : calc (100% / #{$form-control-label-stacked-scale } );
551- }
552-
553471// Start/End Slots
554472// ----------------------------------------------------------------
555473
@@ -564,11 +482,9 @@ button {
564482}
565483
566484::slotted([slot = " start" ]:last-of-type ) {
567- margin-inline-end : $form-control-label-margin ;
568485 margin-inline-start : 0 ;
569486}
570487
571488::slotted([slot = " end" ]:first-of-type ) {
572- margin-inline-start : $form-control-label-margin ;
573489 margin-inline-end : 0 ;
574490}
0 commit comments