tabs.sass 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. .tabs
  2. @extend .block
  3. @extend .unselectable
  4. align-items: stretch
  5. display: flex
  6. justify-content: space-between
  7. line-height: 24px
  8. overflow: hidden
  9. overflow-x: auto
  10. white-space: nowrap
  11. a
  12. align-items: center
  13. border-bottom: 1px solid $border
  14. color: $text
  15. display: flex
  16. justify-content: center
  17. margin-bottom: -1px
  18. padding: 6px 12px
  19. vertical-align: top
  20. &:hover
  21. border-bottom-color: $text-strong
  22. color: $text-strong
  23. li
  24. display: block
  25. &.is-active
  26. a
  27. border-bottom-color: $link
  28. color: $link
  29. ul
  30. align-items: center
  31. border-bottom: 1px solid $border
  32. display: flex
  33. flex-grow: 1
  34. justify-content: flex-start
  35. &.is-left
  36. padding-right: 10px
  37. &.is-center
  38. flex: none
  39. justify-content: center
  40. padding-left: 10px
  41. padding-right: 10px
  42. &.is-right
  43. justify-content: flex-end
  44. padding-left: 10px
  45. .icon
  46. &:first-child
  47. margin-right: 8px
  48. &:last-child
  49. margin-left: 8px
  50. // Alignment
  51. &.is-centered
  52. ul
  53. justify-content: center
  54. &.is-right
  55. ul
  56. justify-content: flex-end
  57. // Styles
  58. &.is-boxed
  59. a
  60. border: 1px solid transparent
  61. border-radius: $radius $radius 0 0
  62. padding-bottom: 5px
  63. padding-top: 5px
  64. &:hover
  65. background-color: $background
  66. border-bottom-color: $border
  67. li
  68. &.is-active
  69. a
  70. background-color: $white
  71. border-color: $border
  72. border-bottom-color: transparent !important
  73. &.is-fullwidth
  74. li
  75. flex-grow: 1
  76. &.is-toggle
  77. a
  78. border: 1px solid $border
  79. margin-bottom: 0
  80. padding-bottom: 5px
  81. padding-top: 5px
  82. position: relative
  83. &:hover
  84. background-color: $background
  85. border-color: $border-hover
  86. z-index: 2
  87. li
  88. & + li
  89. margin-left: -1px
  90. &:first-child a
  91. border-radius: $radius 0 0 $radius
  92. &:last-child a
  93. border-radius: 0 $radius $radius 0
  94. &.is-active
  95. a
  96. background-color: $primary
  97. border-color: $primary
  98. color: $primary-invert
  99. z-index: 1
  100. ul
  101. border-bottom: none
  102. // Sizes
  103. &.is-small
  104. font-size: $size-small
  105. a
  106. padding: 2px 8px
  107. &.is-boxed,
  108. &.is-toggle
  109. a
  110. padding-bottom: 1px
  111. padding-top: 1px
  112. &.is-medium
  113. font-size: $size-medium
  114. a
  115. padding: 10px 16px
  116. &.is-boxed,
  117. &.is-toggle
  118. a
  119. padding-bottom: 9px
  120. padding-top: 9px
  121. &.is-large
  122. font-size: $size-large
  123. a
  124. padding: 14px 20px
  125. &.is-boxed,
  126. &.is-toggle
  127. a
  128. padding-bottom: 13px
  129. padding-top: 13px