2020-08-21 15:40:07 +00:00
|
|
|
$select-colors: $form-colors !default
|
|
|
|
|
2019-05-18 14:52:00 +00:00
|
|
|
.select
|
|
|
|
display: inline-block
|
|
|
|
max-width: 100%
|
|
|
|
position: relative
|
|
|
|
vertical-align: top
|
|
|
|
&:not(.is-multiple)
|
|
|
|
height: $input-height
|
|
|
|
&:not(.is-multiple):not(.is-loading)
|
|
|
|
&::after
|
|
|
|
@extend %arrow
|
|
|
|
border-color: $input-arrow
|
2020-05-17 18:04:42 +00:00
|
|
|
+ltr-position(1.125em)
|
2019-05-18 14:52:00 +00:00
|
|
|
z-index: 4
|
|
|
|
&.is-rounded
|
|
|
|
select
|
|
|
|
border-radius: $radius-rounded
|
2020-05-17 18:04:42 +00:00
|
|
|
+ltr-property("padding", 1em, false)
|
2019-05-18 14:52:00 +00:00
|
|
|
select
|
|
|
|
@extend %input
|
|
|
|
cursor: pointer
|
|
|
|
display: block
|
|
|
|
font-size: 1em
|
|
|
|
max-width: 100%
|
|
|
|
outline: none
|
|
|
|
&::-ms-expand
|
|
|
|
display: none
|
|
|
|
&[disabled]:hover,
|
|
|
|
fieldset[disabled] &:hover
|
|
|
|
border-color: $input-disabled-border-color
|
|
|
|
&:not([multiple])
|
2020-05-17 18:04:42 +00:00
|
|
|
+ltr-property("padding", 2.5em)
|
2019-05-18 14:52:00 +00:00
|
|
|
&[multiple]
|
|
|
|
height: auto
|
|
|
|
padding: 0
|
|
|
|
option
|
|
|
|
padding: 0.5em 1em
|
|
|
|
// States
|
|
|
|
&:not(.is-multiple):not(.is-loading):hover
|
|
|
|
&::after
|
|
|
|
border-color: $input-hover-color
|
|
|
|
// Colors
|
2020-08-21 15:40:07 +00:00
|
|
|
@each $name, $pair in $select-colors
|
2019-05-18 14:52:00 +00:00
|
|
|
$color: nth($pair, 1)
|
|
|
|
&.is-#{$name}
|
|
|
|
&:not(:hover)::after
|
|
|
|
border-color: $color
|
|
|
|
select
|
|
|
|
border-color: $color
|
|
|
|
&:hover,
|
|
|
|
&.is-hovered
|
2020-03-16 02:29:44 +00:00
|
|
|
border-color: bulmaDarken($color, 5%)
|
2019-05-18 14:52:00 +00:00
|
|
|
&:focus,
|
|
|
|
&.is-focused,
|
|
|
|
&:active,
|
|
|
|
&.is-active
|
2020-03-16 02:29:44 +00:00
|
|
|
box-shadow: $input-focus-box-shadow-size bulmaRgba($color, 0.25)
|
2019-05-18 14:52:00 +00:00
|
|
|
// Sizes
|
|
|
|
&.is-small
|
|
|
|
+control-small
|
|
|
|
&.is-medium
|
|
|
|
+control-medium
|
|
|
|
&.is-large
|
|
|
|
+control-large
|
|
|
|
// Modifiers
|
|
|
|
&.is-disabled
|
|
|
|
&::after
|
2022-05-02 15:54:53 +00:00
|
|
|
border-color: $input-disabled-color !important
|
2019-05-18 14:52:00 +00:00
|
|
|
&.is-fullwidth
|
|
|
|
width: 100%
|
|
|
|
select
|
|
|
|
width: 100%
|
|
|
|
&.is-loading
|
|
|
|
&::after
|
|
|
|
@extend %loader
|
|
|
|
margin-top: 0
|
|
|
|
position: absolute
|
2020-05-17 18:04:42 +00:00
|
|
|
+ltr-position(0.625em)
|
2019-05-18 14:52:00 +00:00
|
|
|
top: 0.625em
|
|
|
|
transform: none
|
|
|
|
&.is-small:after
|
|
|
|
font-size: $size-small
|
|
|
|
&.is-medium:after
|
|
|
|
font-size: $size-medium
|
|
|
|
&.is-large:after
|
|
|
|
font-size: $size-large
|