_root.scss 11 KB

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