_root.scss 10 KB

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