_root.scss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  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. }
  10. @media screen and (min-width: 58em) {
  11. html {
  12. font-size: #{$sta-font-size}px;
  13. }
  14. }
  15. body {
  16. font-family: inherit;
  17. font-size: 1rem;
  18. line-height: inherit;
  19. color: inherit;
  20. background-color: $sta-background;
  21. margin-top: 70px; /* Offset body content by navbar height. */
  22. padding-top: 0;
  23. counter-reset: captions;
  24. }
  25. @include media-breakpoint-down(md) { /* Match max-width of .nav-bar query. */
  26. body {
  27. margin-top: 50px; /* Offset body content by navbar height. */
  28. }
  29. }
  30. body.no-navbar {
  31. margin-top: 0 !important;
  32. }
  33. // PAGE LAYOUT
  34. // Designed to push footer to bottom of viewport for short pages.
  35. .page-wrapper {
  36. // Min height = viewport height - navbar height
  37. min-height: calc(100vh - 70px);
  38. display: grid;
  39. grid-template-rows: auto 1fr auto;
  40. grid-template-columns: 100vw;
  41. }
  42. @include media-breakpoint-down(md) {
  43. .page-wrapper {
  44. min-height: calc(100vh - 50px);
  45. }
  46. }
  47. .page-header,
  48. .page-footer {
  49. flex-shrink: 0;
  50. }
  51. .page-body {
  52. flex-grow: 1;
  53. }
  54. // UTILITIES
  55. .max-width-640 {
  56. max-width: 640px;
  57. }
  58. .margin-auto {
  59. margin-left: auto;
  60. margin-right: auto;
  61. }
  62. .center-text {
  63. text-align: center;
  64. }
  65. /* Body text */
  66. p {
  67. margin-top: 0;
  68. margin-bottom: 1rem;
  69. }
  70. /* Lists */
  71. ul, ol, dl {
  72. margin-top: 0;
  73. margin-bottom: 1rem;
  74. }
  75. li > p {
  76. // Override the default paragraph margin for paragraphs within lists.
  77. margin-bottom: 0;
  78. }
  79. ul.task-list {
  80. list-style: none;
  81. }
  82. ul.task-list li input[type="checkbox"] {
  83. margin-right: 0.5rem;
  84. }
  85. /* Navigation bar text */
  86. .navbar-light {
  87. font-family: $sta-font-nav, sans-serif;
  88. font-weight: 400;
  89. line-height: 1.25;
  90. text-rendering: optimizeLegibility;
  91. }
  92. /* Headings */
  93. h1, h2, h3, h4, h5, h6 {
  94. font-family: $sta-font-heading, sans-serif;
  95. font-weight: 400;
  96. margin-top: 1rem;
  97. margin-bottom: .5rem;
  98. line-height: 1.25;
  99. color: #313131;
  100. text-rendering: optimizeLegibility;
  101. /* Ensure long words do not overflow into content. */
  102. overflow-wrap: break-word;
  103. word-wrap: break-word;
  104. word-break: break-word;
  105. /* Add a hyphen where the word breaks (use `­` to insert a soft-hyphen in a word). */
  106. -webkit-hyphens: manual;
  107. -ms-hyphens: manual;
  108. hyphens: manual;
  109. }
  110. h1 {
  111. font-size: 2.25rem;
  112. }
  113. h2 {
  114. margin-top: 1rem;
  115. font-size: 1.5rem;
  116. }
  117. h3 {
  118. font-weight: 700;
  119. margin-top: 1.5rem;
  120. font-size: 1.25rem;
  121. }
  122. h4, h5, h6 {
  123. font-weight: 700;
  124. margin-top: 1rem;
  125. font-size: 1rem;
  126. }
  127. a,
  128. h3.article-title a:hover {
  129. color: $sta-link;
  130. text-decoration: none;
  131. transition: color 0.6s ease;
  132. }
  133. a:hover,
  134. a:focus {
  135. color: $sta-link-hover;
  136. }
  137. .dark a,
  138. .dark h3.article-title a:hover {
  139. color: $sta-dark-link;
  140. }
  141. .dark a:not(.btn):hover,
  142. .dark a:not(.btn):focus {
  143. color: $sta-dark-link-hover;
  144. }
  145. img,
  146. video {
  147. height: auto;
  148. max-width: 100%;
  149. display: block;
  150. }
  151. audio {
  152. width: 100%;
  153. margin-bottom: 20px
  154. }
  155. video {
  156. width: 100%;
  157. height: auto;
  158. max-height: 400px;
  159. }
  160. .img-responsive {
  161. /* Extend Bootstrap declaration with centering. */
  162. margin: 0 auto;
  163. }
  164. /* Hide overflowing of zoomed child img element */
  165. .img-hover-zoom {
  166. overflow: hidden;
  167. }
  168. /* Smooth transition for image zoom on hover */
  169. .img-hover-zoom img {
  170. transition: transform .3s ease-in-out;
  171. }
  172. /* Transform the image scale when container gets hovered */
  173. .img-hover-zoom:hover img {
  174. transform: scale(1.1);
  175. }
  176. // Center all figure images by default.
  177. figure img {
  178. @extend .margin-auto;
  179. }
  180. // Center all figure captions by default.
  181. figcaption {
  182. display: block;
  183. margin-top: 0.75em;
  184. margin-bottom: 1.65rem;
  185. line-height: 1.4;
  186. font-size: 0.76rem;
  187. text-align: center;
  188. }
  189. figcaption.numbered:before {
  190. font-weight: 700;
  191. text-transform: uppercase;
  192. content: attr(data-pre) counter(captions) attr(data-post);
  193. }
  194. figcaption.numbered {
  195. counter-increment: captions;
  196. }
  197. pre,
  198. code {
  199. font-family: $sta-font-mono, monospace;
  200. color: #c7254e;
  201. /* Match bg of default highlight theme. */
  202. background-color: rgb(248, 248, 248);
  203. }
  204. pre {
  205. margin: 0 0 1rem 0;
  206. /* Match bg of default highlight theme. */
  207. border-color: rgb(248, 248, 248);
  208. font-size: 0.7rem;
  209. border-radius: 4px;
  210. }
  211. pre code {
  212. white-space: pre; /* Override Bootstrap to preserve line breaks in code. */
  213. overflow-x: auto;
  214. }
  215. hr {
  216. border: 0;
  217. height: 1px;
  218. background: #333;
  219. background-image: linear-gradient(to right, #ccc, #333, #ccc);
  220. }
  221. /* Quotes */
  222. blockquote {
  223. padding: .5rem 1rem;
  224. margin: .8rem 0;
  225. color: #7a7a7a;
  226. border-left: .25rem solid #e5e5e5;
  227. }
  228. blockquote p:last-child {
  229. margin-bottom: 0;
  230. }
  231. @media (min-width: 30em) {
  232. blockquote {
  233. padding-right: 5rem;
  234. padding-left: 1.25rem;
  235. }
  236. }
  237. .markup-quote {
  238. background-color: transparent;
  239. background-image: linear-gradient(to bottom, rgba(233, 231, 245, 1), rgba(233, 231, 245, 1));
  240. }
  241. .space-below {
  242. margin-bottom: 50px;
  243. }
  244. @media screen and (max-width: 768px) {
  245. .space-below {
  246. margin-bottom: 10px;
  247. }
  248. }
  249. .universal-wrapper {
  250. margin: 0 auto;
  251. padding-right: 1rem;
  252. padding-left: 1rem;
  253. padding-top: 0.1rem;
  254. width: 100%;
  255. }
  256. @media only screen and (min-width: 1001px) {
  257. .universal-wrapper {
  258. width: 1000px;
  259. }
  260. }
  261. small,
  262. .small {
  263. font-size: .75em;
  264. }
  265. .responsive-wrap iframe {
  266. max-width: 100%;
  267. }
  268. /*************************************************
  269. * Modals.
  270. **************************************************/
  271. .modal-content {
  272. background: $sta-background;
  273. }
  274. .modal-title {
  275. margin: 0; /* Override default h5 margin. */
  276. }
  277. .modal-content pre {
  278. margin: 0;
  279. }
  280. .modal-header {
  281. border: 0;
  282. color: rgba(0,0,0,0.8);
  283. }
  284. .modal-footer {
  285. border: 0;
  286. }
  287. #modal-error {
  288. color: red;
  289. }
  290. /*************************************************
  291. * Gallery.
  292. **************************************************/
  293. .gallery {
  294. margin: 0.5em -4px 1.5em -4px;
  295. font-size: 0;
  296. }
  297. a[data-fancybox] {
  298. text-decoration: none;
  299. cursor: zoom-in;
  300. }
  301. .gallery a[data-fancybox] img {
  302. height: 250px;
  303. width: auto;
  304. max-width: inherit;
  305. display: inherit;
  306. margin: 0;
  307. padding: 4px;
  308. box-shadow: none;
  309. vertical-align: inherit;
  310. }
  311. .fancybox-caption {
  312. font-size: 1rem;
  313. line-height: 1.5rem;
  314. text-align: center;
  315. }
  316. /*************************************************
  317. * Pager.
  318. **************************************************/
  319. .post-nav {
  320. margin-top: 1rem;
  321. font-size: 0.8rem;
  322. }
  323. .post-nav-item {
  324. hyphens: auto;
  325. word-wrap: break-word;
  326. padding: 11px 0 12px;
  327. width: 100%;
  328. }
  329. .post-nav-item a {
  330. color: #2b2b2b;
  331. line-height: 1.7;
  332. text-transform: none;
  333. }
  334. .post-nav-item .meta-nav {
  335. color: #767676;
  336. font-weight: 900;
  337. line-height: 2;
  338. text-transform: uppercase;
  339. }
  340. .dark .post-nav-item a {
  341. color: #ddd;
  342. }
  343. /**************************************************
  344. * Tags/Labels
  345. **************************************************/
  346. .badge-light {
  347. border: none;
  348. color: rgba(0,0,0,.68);
  349. background: rgba(0,0,0,.05);
  350. font-weight: normal;
  351. border-radius: 3px;
  352. padding: 5px 10px;
  353. margin-right: 8px;
  354. margin-bottom: 8px;
  355. }
  356. .article-tags > .badge-light:last-child {
  357. margin-right: 0;
  358. }
  359. .badge-light[href]:focus,
  360. .badge-light[href]:hover {
  361. background: rgba(0,0,0,.1);
  362. }
  363. a.badge:focus,
  364. a.badge:hover {
  365. color: rgba(0,0,0,.68);
  366. }
  367. .tag-cloud a {
  368. display: inline-block;
  369. position: relative;
  370. margin: 5px 10px;
  371. word-wrap: break-word;
  372. transition-duration: .2s;
  373. transition-property: transform;
  374. transition-timing-function: ease-out;
  375. }
  376. .tag-cloud a:active,
  377. .tag-cloud a:focus,
  378. .tag-cloud a:hover {
  379. color: $sta-primary-dark;
  380. transform: scale(1.2);
  381. }
  382. .dark .tag-cloud a:active,
  383. .dark .tag-cloud a:focus,
  384. .dark .tag-cloud a:hover {
  385. color: $sta-primary-light;
  386. }
  387. /*************************************************
  388. * Button size override
  389. *************************************************/
  390. .btn {
  391. padding: .5rem;
  392. font-size: .8rem;
  393. line-height: .9; // Anything less and multiline button text may overlap.
  394. border-radius: .3rem;
  395. }
  396. .btn-links .btn {
  397. padding: 5px .5rem 5px .5rem;
  398. line-height: 1;
  399. }
  400. .btn.btn-sm {
  401. padding: 5px .4rem 5px .4rem;
  402. font-size: .6rem;
  403. border-radius: .2rem;
  404. }
  405. /*************************************************
  406. * Toolbar Buttons
  407. **************************************************/
  408. .btn-toolbar .btn {
  409. font-size: 0.9rem;
  410. padding: 10px 14px 9px;
  411. border: none;
  412. }
  413. .btn-toolbar .btn:first-child {
  414. border-radius: 6px 0 0 6px;
  415. }
  416. .btn-toolbar .btn:last-child {
  417. border-radius: 0 6px 6px 0;
  418. }
  419. .btn-toolbar .btn.btn-primary:hover,
  420. .btn-toolbar .btn.btn-primary:focus {
  421. background-color: $sta-primary-light !important;
  422. }
  423. .btn-toolbar .btn.btn-primary:active,
  424. .btn-toolbar .btn.btn-primary.active {
  425. background-color: $sta-primary-dark !important;
  426. }
  427. .btn-primary:not(:disabled):not(.disabled).active:focus,
  428. .btn-primary:not(:disabled):not(.disabled):active:focus,
  429. .show > .btn-primary.dropdown-toggle:focus {
  430. box-shadow: 0 0 0 .2rem $sta-primary-light;
  431. }
  432. /*************************************************
  433. * Tables
  434. **************************************************/
  435. /* Based on Bootstrap's `table-responsive` style. */
  436. table {
  437. display: block;
  438. width: 100%;
  439. overflow-x: auto;
  440. -webkit-overflow-scrolling: touch;
  441. margin-bottom: 1rem;
  442. font-size: 0.8rem;
  443. }
  444. table > thead > tr > th,
  445. table > tbody > tr > th,
  446. table > tfoot > tr > th,
  447. table > thead > tr > td,
  448. table > tbody > tr > td,
  449. table > tfoot > tr > td {
  450. padding: 8px;
  451. line-height: 1.43;
  452. vertical-align: top;
  453. border-top: 1px solid #ddd;
  454. }
  455. table > thead > tr > th {
  456. vertical-align: bottom;
  457. border-bottom: 2px solid #ddd;
  458. }
  459. table > caption + thead > tr:first-child > th,
  460. table > colgroup + thead > tr:first-child > th,
  461. table > thead:first-child > tr:first-child > th,
  462. table > caption + thead > tr:first-child > td,
  463. table > colgroup + thead > tr:first-child > td,
  464. table > thead:first-child > tr:first-child > td {
  465. border-top: 0;
  466. }
  467. table > tbody + tbody {
  468. border-top: 2px solid #ddd;
  469. }
  470. table table {
  471. background-color: #fff;
  472. }
  473. /* Table Striped */
  474. table > tbody > tr:nth-child(odd) > td,
  475. table > tbody > tr:nth-child(odd) > th {
  476. background-color: #f9f9f9;
  477. }
  478. /* Table Hover */
  479. table > tbody > tr:hover > td,
  480. table > tbody > tr:hover > th {
  481. background-color: #e5e5e5;
  482. }