_root.scss 11 KB

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