hero.sass 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. @import "../utilities/mixins"
  2. $hero-body-padding: 3rem 1.5rem !default
  3. $hero-body-padding-small: 1.5rem !default
  4. $hero-body-padding-medium: 9rem 1.5rem !default
  5. $hero-body-padding-large: 18rem 1.5rem !default
  6. $hero-colors: $colors !default
  7. // Main container
  8. .hero
  9. align-items: stretch
  10. display: flex
  11. flex-direction: column
  12. justify-content: space-between
  13. .navbar
  14. background: none
  15. .tabs
  16. ul
  17. border-bottom: none
  18. // Colors
  19. @each $name, $pair in $hero-colors
  20. $color: nth($pair, 1)
  21. $color-invert: nth($pair, 2)
  22. &.is-#{$name}
  23. background-color: $color
  24. color: $color-invert
  25. a:not(.button):not(.dropdown-item):not(.tag):not(.pagination-link.is-current),
  26. strong
  27. color: inherit
  28. .title
  29. color: $color-invert
  30. .subtitle
  31. color: bulmaRgba($color-invert, 0.9)
  32. a:not(.button),
  33. strong
  34. color: $color-invert
  35. .navbar-menu
  36. +touch
  37. background-color: $color
  38. .navbar-item,
  39. .navbar-link
  40. color: bulmaRgba($color-invert, 0.7)
  41. a.navbar-item,
  42. .navbar-link
  43. &:hover,
  44. &.is-active
  45. background-color: bulmaDarken($color, 5%)
  46. color: $color-invert
  47. .tabs
  48. a
  49. color: $color-invert
  50. opacity: 0.9
  51. &:hover
  52. opacity: 1
  53. li
  54. &.is-active a
  55. opacity: 1
  56. &.is-boxed,
  57. &.is-toggle
  58. a
  59. color: $color-invert
  60. &:hover
  61. background-color: bulmaRgba($scheme-invert, 0.1)
  62. li.is-active a
  63. &,
  64. &:hover
  65. background-color: $color-invert
  66. border-color: $color-invert
  67. color: $color
  68. // Modifiers
  69. @if type-of($color) == 'color'
  70. &.is-bold
  71. $gradient-top-left: darken(saturate(adjust-hue($color, -10deg), 10%), 10%)
  72. $gradient-bottom-right: lighten(saturate(adjust-hue($color, 10deg), 5%), 5%)
  73. background-image: linear-gradient(141deg, $gradient-top-left 0%, $color 71%, $gradient-bottom-right 100%)
  74. +mobile
  75. .navbar-menu
  76. background-image: linear-gradient(141deg, $gradient-top-left 0%, $color 71%, $gradient-bottom-right 100%)
  77. // Sizes
  78. &.is-small
  79. .hero-body
  80. padding: $hero-body-padding-small
  81. &.is-medium
  82. +tablet
  83. .hero-body
  84. padding: $hero-body-padding-medium
  85. &.is-large
  86. +tablet
  87. .hero-body
  88. padding: $hero-body-padding-large
  89. &.is-halfheight,
  90. &.is-fullheight,
  91. &.is-fullheight-with-navbar
  92. .hero-body
  93. align-items: center
  94. display: flex
  95. & > .container
  96. flex-grow: 1
  97. flex-shrink: 1
  98. &.is-halfheight
  99. min-height: 50vh
  100. &.is-fullheight
  101. min-height: 100vh
  102. // Components
  103. .hero-video
  104. @extend %overlay
  105. overflow: hidden
  106. video
  107. left: 50%
  108. min-height: 100%
  109. min-width: 100%
  110. position: absolute
  111. top: 50%
  112. transform: translate3d(-50%, -50%, 0)
  113. // Modifiers
  114. &.is-transparent
  115. opacity: 0.3
  116. // Responsiveness
  117. +mobile
  118. display: none
  119. .hero-buttons
  120. margin-top: 1.5rem
  121. // Responsiveness
  122. +mobile
  123. .button
  124. display: flex
  125. &:not(:last-child)
  126. margin-bottom: 0.75rem
  127. +tablet
  128. display: flex
  129. justify-content: center
  130. .button:not(:last-child)
  131. +ltr-property("margin", 1.5rem)
  132. // Containers
  133. .hero-head,
  134. .hero-foot
  135. flex-grow: 0
  136. flex-shrink: 0
  137. .hero-body
  138. flex-grow: 1
  139. flex-shrink: 0
  140. padding: $hero-body-padding