bulma/sass/utilities/controls.sass

53 lines
1.3 KiB
Sass
Raw Normal View History

2020-10-31 23:52:27 +00:00
@import "derived-variables.sass"
2016-09-24 15:04:53 +00:00
$control-radius: $radius !default
$control-radius-small: $radius-small !default
$control-border-width: 1px !default
$control-height: 2.5em !default
$control-line-height: 1.5 !default
$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
-moz-appearance: none
-webkit-appearance: none
align-items: center
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
display: inline-flex
2016-10-30 10:41:53 +00:00
font-size: $size-normal
height: $control-height
2016-05-07 12:31:31 +00:00
justify-content: flex-start
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
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
outline: none
&[disabled],
fieldset[disabled] &
2017-03-31 21:25:53 +00:00
cursor: not-allowed
2018-10-02 06:04:19 +00:00
%control
+control
2018-04-08 17:48:47 +00:00
2016-10-30 10:41:53 +00:00
// The controls sizes use mixins so they can be used at different breakpoints
=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
=control-medium
2016-10-29 17:53:30 +00:00
font-size: $size-medium
=control-large
2016-10-29 17:53:30 +00:00
font-size: $size-large