_root.scss 11 KB

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