2020-12-20 12:10:04 +00:00
|
|
|
@import "derived-variables"
|
2020-10-31 23:52:27 +00:00
|
|
|
|
2016-09-24 15:04:53 +00:00
|
|
|
$control-radius: $radius !default
|
|
|
|
$control-radius-small: $radius-small !default
|
|
|
|
|
2018-04-08 18:46:32 +00:00
|
|
|
$control-border-width: 1px !default
|
|
|
|
|
2019-10-12 20:44:57 +00:00
|
|
|
$control-height: 2.5em !default
|
2018-10-02 06:01:43 +00:00
|
|
|
$control-line-height: 1.5 !default
|
|
|
|
|
2019-10-12 20:44:57 +00:00
|
|
|
$control-padding-vertical: calc(0.5em - #{$control-border-width}) !default
|
|
|
|
$control-padding-horizontal: calc(0.75em - #{$control-border-width}) !default
|
2017-04-13 00:10:39 +00:00
|
|
|
|
2018-10-02 06:04:19 +00:00
|
|
|
=control
|
2016-05-05 20:54:32 +00:00
|
|
|
-moz-appearance: none
|
|
|
|
-webkit-appearance: none
|
|
|
|
align-items: center
|
2018-04-08 18:46:32 +00:00
|
|
|
border: $control-border-width solid transparent
|
2016-09-24 15:04:53 +00:00
|
|
|
border-radius: $control-radius
|
2016-10-29 17:53:30 +00:00
|
|
|
box-shadow: none
|
2016-05-05 20:54:32 +00:00
|
|
|
display: inline-flex
|
2016-10-30 10:41:53 +00:00
|
|
|
font-size: $size-normal
|
2018-10-02 06:01:43 +00:00
|
|
|
height: $control-height
|
2016-05-07 12:31:31 +00:00
|
|
|
justify-content: flex-start
|
2018-10-02 06:01:43 +00:00
|
|
|
line-height: $control-line-height
|
2017-04-13 00:10:39 +00:00
|
|
|
padding-bottom: $control-padding-vertical
|
|
|
|
padding-left: $control-padding-horizontal
|
|
|
|
padding-right: $control-padding-horizontal
|
|
|
|
padding-top: $control-padding-vertical
|
2016-05-05 20:54:32 +00:00
|
|
|
position: relative
|
|
|
|
vertical-align: top
|
2016-10-29 20:51:13 +00:00
|
|
|
// States
|
2016-05-30 18:41:54 +00:00
|
|
|
&:focus,
|
2016-10-29 20:51:13 +00:00
|
|
|
&.is-focused,
|
|
|
|
&:active,
|
2016-05-30 18:41:54 +00:00
|
|
|
&.is-active
|
2016-05-05 20:54:32 +00:00
|
|
|
outline: none
|
2018-10-31 18:29:55 +00:00
|
|
|
&[disabled],
|
|
|
|
fieldset[disabled] &
|
2017-03-31 21:25:53 +00:00
|
|
|
cursor: not-allowed
|
2016-05-05 20:54:32 +00:00
|
|
|
|
2016-10-30 10:41:53 +00:00
|
|
|
// The controls sizes use mixins so they can be used at different breakpoints
|
2016-05-05 20:54:32 +00:00
|
|
|
=control-small
|
2016-09-24 15:04:53 +00:00
|
|
|
border-radius: $control-radius-small
|
2016-10-29 17:53:30 +00:00
|
|
|
font-size: $size-small
|
2016-05-05 20:54:32 +00:00
|
|
|
=control-medium
|
2016-10-29 17:53:30 +00:00
|
|
|
font-size: $size-medium
|
2016-05-05 20:54:32 +00:00
|
|
|
=control-large
|
2016-10-29 17:53:30 +00:00
|
|
|
font-size: $size-large
|