_root.scss 11 KB

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