2020-08-23 16:46:09 +00:00
|
|
|
$textarea-padding: var(--control-padding-horizontal, #{$control-padding-horizontal}) !default
|
2019-10-12 20:44:57 +00:00
|
|
|
$textarea-max-height: 40em !default
|
|
|
|
$textarea-min-height: 8em !default
|
|
|
|
|
2019-05-18 14:52:00 +00:00
|
|
|
%input-textarea
|
|
|
|
@extend %input
|
2020-08-24 09:46:59 +00:00
|
|
|
box-shadow: var(--input-shadow, #{$input-shadow})
|
2019-05-18 14:52:00 +00:00
|
|
|
max-width: 100%
|
|
|
|
width: 100%
|
|
|
|
&[readonly]
|
|
|
|
box-shadow: none
|
|
|
|
// Colors
|
|
|
|
@each $name, $pair in $colors
|
|
|
|
$color: nth($pair, 1)
|
|
|
|
&.is-#{$name}
|
2020-08-24 09:46:59 +00:00
|
|
|
border-color: var(--#{$name}, #{$color})
|
2019-05-18 14:52:00 +00:00
|
|
|
&:focus,
|
|
|
|
&.is-focused,
|
|
|
|
&:active,
|
|
|
|
&.is-active
|
2020-08-24 09:46:59 +00:00
|
|
|
box-shadow: var(--input-focus-box-shadow-size, #{$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
|
2020-08-23 16:46:09 +00:00
|
|
|
border-radius: var(--radius-rounded, #{$radius-rounded})
|
|
|
|
padding-left: calc(#{var(--control-padding-horizontal, #{$control-padding-horizontal})} + 0.375em)
|
|
|
|
padding-right: calc(#{var(--control-padding-horizontal, #{$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
|
2020-08-23 16:46:09 +00:00
|
|
|
--textarea-padding: #{$textarea-padding}
|
|
|
|
--textarea-max-height: #{$textarea-max-height}
|
|
|
|
--textarea-min-height: #{$textarea-min-height}
|
|
|
|
|
2019-05-18 14:52:00 +00:00
|
|
|
@extend %input-textarea
|
|
|
|
display: block
|
|
|
|
max-width: 100%
|
|
|
|
min-width: 100%
|
2020-08-23 16:46:09 +00:00
|
|
|
padding: var(--textarea-padding)
|
2019-05-18 14:52:00 +00:00
|
|
|
resize: vertical
|
|
|
|
&:not([rows])
|
2020-08-23 16:46:09 +00:00
|
|
|
max-height: var(--textarea-max-height)
|
|
|
|
min-height: var(--textarea-min-height)
|
2019-05-18 14:52:00 +00:00
|
|
|
&[rows]
|
|
|
|
height: initial
|
|
|
|
// Modifiers
|
|
|
|
&.has-fixed-size
|
|
|
|
resize: none
|