bulma/sass/form/input-textarea.sass

69 lines
1.4 KiB
Sass
Raw Normal View History

2020-10-31 23:52:27 +00:00
@import "shared"
$textarea-padding: $control-padding-horizontal !default
$textarea-max-height: 40em !default
$textarea-min-height: 8em !default
$textarea-colors: $form-colors !default
2019-05-18 14:52:00 +00:00
%input-textarea
@extend %input
box-shadow: $input-shadow
max-width: 100%
width: 100%
&[readonly]
box-shadow: none
// Colors
@each $name, $pair in $textarea-colors
2019-05-18 14:52:00 +00:00
$color: nth($pair, 1)
&.is-#{$name}
border-color: $color
&: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-fullwidth
display: block
width: 100%
&.is-inline
display: inline
width: auto
.input
@extend %input-textarea
&.is-rounded
border-radius: $radius-rounded
padding-left: calc(#{$control-padding-horizontal} + 0.375em)
padding-right: calc(#{$control-padding-horizontal} + 0.375em)
2019-05-18 14:52:00 +00:00
&.is-static
background-color: transparent
border-color: transparent
box-shadow: none
padding-left: 0
padding-right: 0
.textarea
@extend %input-textarea
display: block
max-width: 100%
min-width: 100%
padding: $textarea-padding
2019-05-18 14:52:00 +00:00
resize: vertical
&:not([rows])
max-height: $textarea-max-height
min-height: $textarea-min-height
2019-05-18 14:52:00 +00:00
&[rows]
height: initial
// Modifiers
&.has-fixed-size
resize: none