_root.scss 11 KB

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