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-
127122 position : relative ;
128123
129124 /* *
@@ -193,9 +188,6 @@ button {
193188// --------------------------------------------------
194189
195190.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-
199191 display : flex ;
200192
201193 position : relative ;
@@ -389,15 +381,6 @@ button {
389381 flex-direction : row ;
390382}
391383
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-
401384// Select Label Placement - End
402385// ----------------------------------------------------------------
403386
@@ -409,27 +392,6 @@ button {
409392 flex-direction : row-reverse ;
410393}
411394
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-
433395/* *
434396 * Label is on the left of the select in LTR and
435397 * on the right in RTL. Label also has a fixed width.
@@ -488,28 +450,11 @@ button {
488450 */
489451:host (.select-label-placement-stacked ) .native-wrapper ,
490452:host (.select-label-placement-floating ) .native-wrapper {
491- @include margin (1px , 0 , 0 , 0 );
492-
493453 flex-grow : 1 ;
494454
495455 width : 100% ;
496456}
497457
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-
513458/* *
514459 * The placeholder should be hidden when the label
515460 * is on top of the select. This prevents the label
@@ -537,19 +482,6 @@ button {
537482 opacity : 1 ;
538483}
539484
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-
553485// Start/End Slots
554486// ----------------------------------------------------------------
555487
@@ -564,11 +496,9 @@ button {
564496}
565497
566498::slotted([slot = " start" ]:last-of-type ) {
567- margin-inline-end : $form-control-label-margin ;
568499 margin-inline-start : 0 ;
569500}
570501
571502::slotted([slot = " end" ]:first-of-type ) {
572- margin-inline-start : $form-control-label-margin ;
573503 margin-inline-end : 0 ;
574504}
0 commit comments