_root.scss 11 KB

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