hero.sass 3.1 KB

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