_root.scss 11 KB

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