controls.sass 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. @import "derived-variables"
  2. $control-radius: $radius !default
  3. $control-radius-small: $radius-small !default
  4. $control-border-width: 1px !default
  5. $control-height: 2.5em !default
  6. $control-line-height: 1.5 !default
  7. $control-padding-vertical: calc(0.5em - #{$control-border-width}) !default
  8. $control-padding-horizontal: calc(0.75em - #{$control-border-width}) !default
  9. =control
  10. -moz-appearance: none
  11. -webkit-appearance: none
  12. align-items: center
  13. border: $control-border-width solid transparent
  14. border-radius: $control-radius
  15. box-shadow: none
  16. display: inline-flex
  17. font-size: $size-normal
  18. height: $control-height
  19. justify-content: flex-start
  20. line-height: $control-line-height
  21. padding-bottom: $control-padding-vertical
  22. padding-left: $control-padding-horizontal
  23. padding-right: $control-padding-horizontal
  24. padding-top: $control-padding-vertical
  25. position: relative
  26. vertical-align: top
  27. // States
  28. &:focus,
  29. &.is-focused,
  30. &:active,
  31. &.is-active
  32. outline: none
  33. &[disabled],
  34. fieldset[disabled] &
  35. cursor: not-allowed
  36. // The controls sizes use mixins so they can be used at different breakpoints
  37. =control-small
  38. border-radius: $control-radius-small
  39. font-size: $size-small
  40. =control-medium
  41. font-size: $size-medium
  42. =control-large
  43. font-size: $size-large