_base.scss 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. /*************************************************
  2. * Page Builder: sections and widgets
  3. **************************************************/
  4. .home-section {
  5. // Use `background` rather than `background-color` so it can support gradients in theme packs.
  6. background: $sta-home-section-odd;
  7. position: relative; // Required for component positioning within section.
  8. padding: 110px 0 110px 0;
  9. z-index: 0; // Explicit z-order otherwise `.home-section-bg` can be hidden by any `.home-section` background.
  10. }
  11. // Responsive fullscreen option for widgets
  12. // Allow section or elements (such as Slider slides) within it to be fullscreen
  13. .home-section.fullscreen,
  14. .fullscreen {
  15. min-height: calc(100vh - 70px);
  16. }
  17. @include media-breakpoint-down(md) {
  18. .home-section.fullscreen,
  19. .fullscreen {
  20. min-height: calc(100vh - 50px);
  21. }
  22. }
  23. .no-navbar .home-section.fullscreen,
  24. .no-navbar .fullscreen {
  25. min-height: 100vh;
  26. }
  27. // Section theming
  28. .home-section.light,
  29. .home-section.light h1 {
  30. color: #000;
  31. }
  32. .home-section.light a {
  33. color: $sta-link;
  34. }
  35. .home-section.dark a {
  36. color: $sta-dark-link;
  37. }
  38. /* Override dark colors that may be inherited from body.dark */
  39. .home-section.dark,
  40. .home-section.dark h1,
  41. .home-section.dark h2,
  42. .home-section.dark h3,
  43. .home-section.dark a:not(.btn) {
  44. color: #fff;
  45. }
  46. /* Underline links in dark sections to separate them from text */
  47. .home-section.dark a:not(.btn):not(.hero-cta-alt) {
  48. text-decoration: underline;
  49. }
  50. /* Revert Alert Box Link style (.home-section.dark style above should not be applied to it) */
  51. .home-section.dark .alert a {
  52. color: inherit !important;
  53. text-decoration: inherit !important;
  54. }
  55. /* Big underline style for links in dark sections */
  56. /* Disabled as it's an experimental style that requires CSS NOT Selector Level 4 (only in Safari) */
  57. /*
  58. .home-section.dark.big-underline a:not(.btn):not(.hero-cta-alt):not(.alert a) {
  59. text-decoration: none;
  60. position: relative;
  61. }
  62. .home-section.dark.big-underline a:not(.btn):not(.hero-cta-alt):not(.alert a):after {
  63. background: #fff;
  64. content: "";
  65. height: 2px;
  66. left: 0;
  67. right: 0;
  68. position: absolute;
  69. top: 100%;
  70. } */
  71. // Fill padding of `.home-section` parent
  72. .home-section-bg {
  73. position: absolute;
  74. top: 0;
  75. left: 0;
  76. height: 100%; // Or fill-available when supported.
  77. width: 100%; // Or fill-available when supported.
  78. z-index: -1; // Place bg div behind content.
  79. }
  80. /* Default background image properties for home sections. */
  81. .home-section-bg.bg-image {
  82. background-position: center;
  83. background-repeat: no-repeat;
  84. background-size: cover;
  85. }
  86. .bg-video {
  87. position: absolute;
  88. top: 0;
  89. max-height: initial; // Override general `video` selector's max-height.
  90. }
  91. .bg-video.flip {
  92. transform: rotateY(180deg);
  93. }
  94. /* Create a parallax-like scrolling effect on desktop browsers. */
  95. .parallax {
  96. background-attachment: fixed;
  97. }
  98. // Workaround issue with mobile browser support for fixed parallax background.
  99. @include media-breakpoint-down(md) {
  100. .parallax {
  101. background-attachment: scroll;
  102. }
  103. }
  104. .home-section:first-of-type {
  105. padding-top: 50px;
  106. }
  107. .home-section:nth-of-type(even) {
  108. background: $sta-home-section-even;
  109. }
  110. .dark .home-section {
  111. background: $sta-dark-home-section-odd;
  112. }
  113. .dark .home-section:nth-of-type(even) {
  114. background: $sta-dark-home-section-even;
  115. }
  116. @media screen and (max-width: 768px) {
  117. .home-section {
  118. padding: 60px 0 60px 0;
  119. }
  120. .home-section:first-of-type {
  121. padding-top: 40px;
  122. }
  123. }
  124. .section-heading h1 {
  125. margin: 0 0 10px 0;
  126. }
  127. .section-subheading {
  128. font-size: 1.25rem;
  129. font-family: $sta-font-heading, sans-serif;
  130. font-weight: bold;
  131. margin-top: 1rem;
  132. margin-bottom: 0.5rem;
  133. }
  134. .section-heading p {
  135. font-weight: 400;
  136. font-size: 1.1rem;
  137. color: rgba(0, 0, 0, 0.54); // Accessible contrast, matching footer text color.
  138. }
  139. .dark .section-heading p {
  140. color: rgb(158, 158, 158);
  141. }
  142. /*************************************************
  143. * Widgets (common)
  144. **************************************************/
  145. .see-all {
  146. margin-top: 2rem;
  147. text-transform: uppercase;
  148. }
  149. /* Reset code highlighting style in Alerts when Alert is child of a `.dark` widget, but Alert should be light.` */
  150. /* But will this affect page which should have dark Alert? */
  151. .dark .alert pre,
  152. .dark .alert code {
  153. color: initial;
  154. background-color: initial;
  155. }
  156. /*************************************************
  157. * Slider Widget
  158. **************************************************/
  159. /* Clear `.home-section` as any padding or animation interferes with Slider's layout and animations. */
  160. .home-section.wg-slider {
  161. padding: 0;
  162. animation: none;
  163. animation-delay: unset;
  164. }
  165. /* The Slider widget reuses the Hero widget's `.wg-hero` class.
  166. * We must remove any `animation` and `clear` (although Hero no longer sets `clear: both`) in this instance or
  167. * multiple slides can be `.active` at once. */
  168. .carousel-inner .wg-hero {
  169. animation: none;
  170. clear: none;
  171. }
  172. /*************************************************
  173. * Talks
  174. **************************************************/
  175. .talk-metadata {
  176. color: #4b4f56;
  177. font-size: 0.8rem;
  178. }
  179. /*************************************************
  180. * Accomplishments
  181. **************************************************/
  182. .card.course {
  183. margin-bottom: 1rem; /* More compact spacing than Experience widget as typically more items here. */
  184. }
  185. .card.course:last-of-type {
  186. margin-bottom: 0;
  187. }
  188. .course .card-subtitle a {
  189. border-bottom: solid 1px transparent;
  190. }
  191. .course .card-subtitle a:hover {
  192. border-bottom: solid 1px;
  193. text-decoration: none;
  194. }