_base.scss 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. /*************************************************
  2. * Wowchemy's Core Style
  3. **************************************************/
  4. html {
  5. font-family: $sta-font-body, sans-serif;
  6. font-size: #{$sta-font-size-small}px;
  7. color: rgba(0, 0, 0, 0.8);
  8. line-height: 1.65;
  9. // Offset anchor scrolling by height of desktop fixed header.
  10. scroll-padding-top: 70px;
  11. @include media-breakpoint-down(md) {
  12. // Offset anchor scrolling by height of mobile fixed header.
  13. scroll-padding-top: 50px;
  14. }
  15. }
  16. @media screen and (min-width: 58em) {
  17. html {
  18. font-size: #{$sta-font-size}px;
  19. }
  20. }
  21. body {
  22. font-family: inherit;
  23. font-size: 1rem;
  24. line-height: inherit;
  25. color: inherit;
  26. background-color: $sta-background;
  27. padding-top: 0;
  28. counter-reset: captions;
  29. // Prevent horizontal scrollbar in case a site admin adds fixed width content without applying `max-width: 100%`.
  30. overflow-x: hidden;
  31. // Offset body content by fixed navbar height.
  32. margin-top: 70px;
  33. @include media-breakpoint-down(md) {
  34. // Offset body content by fixed navbar height.
  35. margin-top: 50px;
  36. }
  37. }
  38. body.no-navbar {
  39. margin-top: 0 !important;
  40. scroll-padding-top: 0 !important;
  41. }
  42. // PAGE LAYOUT
  43. // Designed to push footer to bottom of viewport for short pages.
  44. .page-wrapper {
  45. // Min height = viewport height - navbar height
  46. min-height: calc(100vh - 70px);
  47. display: grid;
  48. grid-template-rows: auto 1fr auto;
  49. grid-template-columns: 100%;
  50. }
  51. @include media-breakpoint-down(md) {
  52. .page-wrapper {
  53. min-height: calc(100vh - 50px);
  54. }
  55. }
  56. .page-wrapper.no-navbar {
  57. min-height: 100vh;
  58. }
  59. .page-header,
  60. .page-footer {
  61. flex-shrink: 0;
  62. }
  63. .page-body {
  64. flex-grow: 1;
  65. }
  66. // UTILITIES
  67. .max-width-640 {
  68. max-width: 640px;
  69. }
  70. .margin-auto {
  71. margin-left: auto;
  72. margin-right: auto;
  73. }
  74. .center-text {
  75. text-align: center;
  76. }
  77. /* Body text */
  78. p {
  79. margin-top: 0;
  80. margin-bottom: 1rem;
  81. }
  82. /* Lists */
  83. ul,
  84. ol,
  85. dl {
  86. margin-top: 0;
  87. margin-bottom: 1rem;
  88. }
  89. li > p {
  90. // Override the default paragraph margin for paragraphs within lists.
  91. margin-bottom: 0;
  92. }
  93. ul.task-list {
  94. list-style: none;
  95. }
  96. ul.task-list li input[type='checkbox'] {
  97. margin-right: 0.5rem;
  98. }
  99. .emoji-list ul {
  100. list-style-type: none;
  101. }
  102. /* Navigation bar text */
  103. .navbar-light {
  104. font-family: $sta-font-nav, sans-serif;
  105. font-weight: 400;
  106. line-height: 1.25;
  107. text-rendering: optimizeLegibility;
  108. }
  109. /* Headings */
  110. h1,
  111. h2,
  112. h3,
  113. h4,
  114. h5,
  115. h6 {
  116. font-family: $sta-font-heading, sans-serif;
  117. font-weight: 400;
  118. margin-top: 1rem;
  119. margin-bottom: 0.5rem;
  120. line-height: 1.25;
  121. color: #313131;
  122. text-rendering: optimizeLegibility;
  123. /* Ensure long words do not overflow into content. */
  124. overflow-wrap: break-word;
  125. word-wrap: break-word;
  126. word-break: break-word;
  127. /* Add a hyphen where the word breaks (use `­` to insert a soft-hyphen in a word). */
  128. -webkit-hyphens: manual;
  129. -ms-hyphens: manual;
  130. hyphens: manual;
  131. }
  132. h1 {
  133. font-size: 2.25rem;
  134. }
  135. h2 {
  136. margin-top: 1rem;
  137. font-size: 1.5rem;
  138. }
  139. h3 {
  140. font-weight: 700;
  141. margin-top: 1.5rem;
  142. font-size: 1.25rem;
  143. }
  144. h4,
  145. h5,
  146. h6 {
  147. font-weight: 700;
  148. margin-top: 1rem;
  149. font-size: 1rem;
  150. }
  151. a,
  152. h3.article-title a:hover {
  153. color: $sta-link;
  154. text-decoration: none;
  155. transition: color 0.6s ease;
  156. }
  157. a:hover,
  158. a:focus {
  159. color: $sta-link-hover;
  160. }
  161. .dark a,
  162. .dark h3.article-title a:hover {
  163. color: $sta-dark-link;
  164. }
  165. .dark a:not(.btn):hover,
  166. .dark a:not(.btn):focus {
  167. color: $sta-dark-link-hover;
  168. }
  169. pre,
  170. code {
  171. font-family: $sta-font-mono, monospace;
  172. color: #c7254e;
  173. /* Match bg of default highlight theme. */
  174. background-color: rgb(248, 248, 248);
  175. }
  176. pre {
  177. margin: 0 0 1rem 0;
  178. /* Match bg of default highlight theme. */
  179. border-color: rgb(248, 248, 248);
  180. font-size: 0.7rem;
  181. border-radius: 4px;
  182. }
  183. pre code {
  184. white-space: pre; /* Override Bootstrap to preserve line breaks in code. */
  185. overflow-x: auto;
  186. }
  187. hr {
  188. border: 0;
  189. height: 1px;
  190. background: #333;
  191. background-image: linear-gradient(to right, #ccc, #333, #ccc);
  192. }
  193. /* Quotes */
  194. blockquote {
  195. padding: 0.5rem 1rem;
  196. margin: 0.8rem 0;
  197. color: #7a7a7a;
  198. border-left: 0.25rem solid #e5e5e5;
  199. }
  200. blockquote p:last-child {
  201. margin-bottom: 0;
  202. }
  203. @media (min-width: 30em) {
  204. blockquote {
  205. padding-right: 5rem;
  206. padding-left: 1.25rem;
  207. }
  208. }
  209. mark,
  210. .mark {
  211. // Inherit color for dynamic light/dark compatibility.
  212. color: inherit;
  213. }
  214. .space-below {
  215. margin-bottom: 50px;
  216. }
  217. @media screen and (max-width: 768px) {
  218. .space-below {
  219. margin-bottom: 10px;
  220. }
  221. }
  222. .universal-wrapper {
  223. margin: 0 auto;
  224. padding-right: 1rem;
  225. padding-left: 1rem;
  226. padding-top: 0.1rem;
  227. width: 100%;
  228. }
  229. @media only screen and (min-width: 1001px) {
  230. .universal-wrapper {
  231. width: 1000px;
  232. }
  233. }
  234. small,
  235. .small {
  236. font-size: 0.75em;
  237. }
  238. .responsive-wrap iframe {
  239. max-width: 100%;
  240. }