_root.scss 11 KB

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