_root.scss 11 KB

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