_root.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  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. * Tags/Labels
  311. **************************************************/
  312. .badge-light {
  313. border: none;
  314. color: rgba(0,0,0,.68);
  315. background: rgba(0,0,0,.05);
  316. font-weight: normal;
  317. border-radius: 3px;
  318. padding: 5px 10px;
  319. margin-right: 8px;
  320. margin-bottom: 8px;
  321. }
  322. .article-tags > .badge-light:last-child {
  323. margin-right: 0;
  324. }
  325. .badge-light[href]:focus,
  326. .badge-light[href]:hover {
  327. background: rgba(0,0,0,.1);
  328. }
  329. a.badge:focus,
  330. a.badge:hover {
  331. color: rgba(0,0,0,.68);
  332. }
  333. .tag-cloud a {
  334. display: inline-block;
  335. position: relative;
  336. margin: 5px 10px;
  337. word-wrap: break-word;
  338. transition-duration: .2s;
  339. transition-property: transform;
  340. transition-timing-function: ease-out;
  341. }
  342. .tag-cloud a:active,
  343. .tag-cloud a:focus,
  344. .tag-cloud a:hover {
  345. color: $sta-primary-dark;
  346. transform: scale(1.2);
  347. }
  348. .dark .tag-cloud a:active,
  349. .dark .tag-cloud a:focus,
  350. .dark .tag-cloud a:hover {
  351. color: $sta-primary-light;
  352. }
  353. /*************************************************
  354. * Button size override
  355. *************************************************/
  356. .btn {
  357. padding: .5rem;
  358. font-size: .8rem;
  359. line-height: .9; // Anything less and multiline button text may overlap.
  360. border-radius: .3rem;
  361. }
  362. .btn-links .btn {
  363. padding: 5px .5rem 5px .5rem;
  364. line-height: 1;
  365. }
  366. .btn.btn-sm {
  367. padding: 5px .4rem 5px .4rem;
  368. font-size: .6rem;
  369. border-radius: .2rem;
  370. }
  371. /*************************************************
  372. * Toolbar Buttons
  373. **************************************************/
  374. .btn-toolbar .btn {
  375. font-size: 0.9rem;
  376. padding: 10px 14px 9px;
  377. border: none;
  378. }
  379. .btn-toolbar .btn:first-child {
  380. border-radius: 6px 0 0 6px;
  381. }
  382. .btn-toolbar .btn:last-child {
  383. border-radius: 0 6px 6px 0;
  384. }
  385. .btn-toolbar .btn.btn-primary:hover,
  386. .btn-toolbar .btn.btn-primary:focus {
  387. background-color: $sta-primary-light !important;
  388. }
  389. .btn-toolbar .btn.btn-primary:active,
  390. .btn-toolbar .btn.btn-primary.active {
  391. background-color: $sta-primary-dark !important;
  392. }
  393. .btn-primary:not(:disabled):not(.disabled).active:focus,
  394. .btn-primary:not(:disabled):not(.disabled):active:focus,
  395. .show > .btn-primary.dropdown-toggle:focus {
  396. box-shadow: 0 0 0 .2rem $sta-primary-light;
  397. }
  398. /*************************************************
  399. * Tables
  400. **************************************************/
  401. /* Based on Bootstrap's `table-responsive` style. */
  402. table {
  403. display: block;
  404. width: 100%;
  405. overflow-x: auto;
  406. -webkit-overflow-scrolling: touch;
  407. margin-bottom: 1rem;
  408. font-size: 0.8rem;
  409. }
  410. table > thead > tr > th,
  411. table > tbody > tr > th,
  412. table > tfoot > tr > th,
  413. table > thead > tr > td,
  414. table > tbody > tr > td,
  415. table > tfoot > tr > td {
  416. padding: 8px;
  417. line-height: 1.43;
  418. vertical-align: top;
  419. border-top: 1px solid #ddd;
  420. }
  421. table > thead > tr > th {
  422. vertical-align: bottom;
  423. border-bottom: 2px solid #ddd;
  424. }
  425. table > caption + thead > tr:first-child > th,
  426. table > colgroup + thead > tr:first-child > th,
  427. table > thead:first-child > tr:first-child > th,
  428. table > caption + thead > tr:first-child > td,
  429. table > colgroup + thead > tr:first-child > td,
  430. table > thead:first-child > tr:first-child > td {
  431. border-top: 0;
  432. }
  433. table > tbody + tbody {
  434. border-top: 2px solid #ddd;
  435. }
  436. table table {
  437. background-color: #fff;
  438. }
  439. /* Table Striped */
  440. table > tbody > tr:nth-child(odd) > td,
  441. table > tbody > tr:nth-child(odd) > th {
  442. background-color: #f9f9f9;
  443. }
  444. /* Table Hover */
  445. table > tbody > tr:hover > td,
  446. table > tbody > tr:hover > th {
  447. background-color: #e5e5e5;
  448. }
  449. /*************************************************
  450. * Article Alerts (Shortcode) and Asides (Mmark)
  451. **************************************************/
  452. /* Style asides as Bootstrap alerts. */
  453. .article-style aside {
  454. @extend .alert;
  455. }
  456. /* Asides use <p> block element whereas alerts use <div>. */
  457. .article-style aside p,
  458. div.alert > div {
  459. position: relative;
  460. display: block;
  461. font-size: 1rem;
  462. margin-left: 2rem;
  463. margin-top: 0;
  464. margin-bottom: 0;
  465. }
  466. div.alert div > * {
  467. margin-bottom: .5rem; /* Use smaller paragraph spacing than usual. */
  468. }
  469. div.alert div > :last-child {
  470. margin-bottom: 0;
  471. }
  472. .article-style aside p::before,
  473. div.alert > div:first-child::before {
  474. position: absolute;
  475. top: -0.5rem;
  476. left: -2rem;
  477. font-size: 1.5rem;
  478. color: #209cee;
  479. font-family: 'Font Awesome 5 Free';
  480. font-weight: 900;
  481. content: '\f05a';
  482. width: 1.5rem;
  483. text-align: center;
  484. }
  485. div.alert-warning > div:first-child::before {
  486. font-family: 'Font Awesome 5 Free';
  487. font-weight: 900;
  488. color: #ff3860;
  489. content: '\f071';
  490. }
  491. .article-style aside a,
  492. div.alert a {
  493. color: currentColor;
  494. text-decoration: none;
  495. border-bottom: solid 1px currentColor;
  496. }
  497. .article-style aside,
  498. .alert-note {
  499. color: #12537e;
  500. background-color: #f6fbfe;
  501. border-color: #209cee;
  502. }
  503. .alert-warning {
  504. color: #cd0930;
  505. background-color: #fff5f7;
  506. border-color: #ff3860;
  507. }