input-textarea.sass 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. $textarea-padding: $control-padding-horizontal !default
  2. $textarea-max-height: 40em !default
  3. $textarea-min-height: 8em !default
  4. $textarea-colors: $form-colors !default
  5. %input-textarea
  6. @extend %input
  7. box-shadow: $input-shadow
  8. max-width: 100%
  9. width: 100%
  10. &[readonly]
  11. box-shadow: none
  12. // Colors
  13. @each $name, $pair in $textarea-colors
  14. $color: nth($pair, 1)
  15. &.is-#{$name}
  16. border-color: $color
  17. &:focus,
  18. &.is-focused,
  19. &:active,
  20. &.is-active
  21. box-shadow: $input-focus-box-shadow-size bulmaRgba($color, 0.25)
  22. // Sizes
  23. &.is-small
  24. +control-small
  25. &.is-medium
  26. +control-medium
  27. &.is-large
  28. +control-large
  29. // Modifiers
  30. &.is-fullwidth
  31. display: block
  32. width: 100%
  33. &.is-inline
  34. display: inline
  35. width: auto
  36. .input
  37. @extend %input-textarea
  38. &.is-rounded
  39. border-radius: $radius-rounded
  40. padding-left: calc(#{$control-padding-horizontal} + 0.375em)
  41. padding-right: calc(#{$control-padding-horizontal} + 0.375em)
  42. &.is-static
  43. background-color: transparent
  44. border-color: transparent
  45. box-shadow: none
  46. padding-left: 0
  47. padding-right: 0
  48. .textarea
  49. @extend %input-textarea
  50. display: block
  51. max-width: 100%
  52. min-width: 100%
  53. padding: $textarea-padding
  54. resize: vertical
  55. &:not([rows])
  56. max-height: $textarea-max-height
  57. min-height: $textarea-min-height
  58. &[rows]
  59. height: initial
  60. // Modifiers
  61. &.has-fixed-size
  62. resize: none