_root.scss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  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. }
  241. a[data-fancybox] img {
  242. height: 250px;
  243. max-width: inherit;
  244. display: inherit;
  245. margin: 0;
  246. padding: 4px;
  247. box-shadow: none;
  248. vertical-align: inherit;
  249. }
  250. .fancybox-caption {
  251. font-size: 1rem;
  252. line-height: 1.5rem;
  253. text-align: center;
  254. }
  255. /*************************************************
  256. * Pager.
  257. **************************************************/
  258. .post-nav {
  259. margin-top: 1rem;
  260. font-size: 0.8rem;
  261. }
  262. .post-nav-item {
  263. hyphens: auto;
  264. word-wrap: break-word;
  265. padding: 11px 0 12px;
  266. width: 100%;
  267. }
  268. .post-nav-item a {
  269. color: #2b2b2b;
  270. line-height: 1.7;
  271. text-transform: none;
  272. }
  273. .post-nav-item .meta-nav {
  274. color: #767676;
  275. font-weight: 900;
  276. line-height: 2;
  277. text-transform: uppercase;
  278. }
  279. .dark .post-nav-item a {
  280. color: #ddd;
  281. }
  282. /*************************************************
  283. * Footer
  284. **************************************************/
  285. footer {
  286. margin: 4rem 0 0;
  287. padding: 2rem 0;
  288. width: 100%;
  289. }
  290. footer p {
  291. font-size: 0.75rem;
  292. text-align: center;
  293. }
  294. site-footer,
  295. footer a#back_to_top i {
  296. color: rgba(0,0,0,0.54);
  297. }
  298. .dark site-footer,
  299. .dark footer a#back_to_top i,
  300. .dark .docs .body-footer {
  301. color: rgba(255,255,255,0.54);
  302. }
  303. /**************************************************
  304. * Tags/Labels
  305. **************************************************/
  306. .badge-light {
  307. border: none;
  308. color: rgba(0,0,0,.68);
  309. background: rgba(0,0,0,.05);
  310. font-weight: normal;
  311. border-radius: 3px;
  312. padding: 5px 10px;
  313. margin-right: 8px;
  314. margin-bottom: 8px;
  315. }
  316. .article-tags > .badge-light:last-child {
  317. margin-right: 0;
  318. }
  319. .badge-light[href]:focus,
  320. .badge-light[href]:hover {
  321. background: rgba(0,0,0,.1);
  322. }
  323. a.badge:focus,
  324. a.badge:hover {
  325. color: rgba(0,0,0,.68);
  326. }
  327. .tag-cloud a {
  328. display: inline-block;
  329. position: relative;
  330. margin: 5px 10px;
  331. word-wrap: break-word;
  332. transition-duration: .2s;
  333. transition-property: transform;
  334. transition-timing-function: ease-out;
  335. }
  336. .tag-cloud a:active,
  337. .tag-cloud a:focus,
  338. .tag-cloud a:hover {
  339. color: $sta-primary-dark;
  340. transform: scale(1.2);
  341. }
  342. .dark .tag-cloud a:active,
  343. .dark .tag-cloud a:focus,
  344. .dark .tag-cloud a:hover {
  345. color: $sta-primary-light;
  346. }
  347. /*************************************************
  348. * Button size override
  349. *************************************************/
  350. .btn {
  351. padding: .5rem;
  352. font-size: .8rem;
  353. line-height: .5;
  354. border-radius: .3rem;
  355. }
  356. .btn-links .btn {
  357. padding: 5px .5rem 5px .5rem;
  358. line-height: 1;
  359. }
  360. .btn.btn-sm {
  361. padding: 5px .4rem 5px .4rem;
  362. font-size: .6rem;
  363. border-radius: .2rem;
  364. }
  365. /*************************************************
  366. * Toolbar Buttons
  367. **************************************************/
  368. .btn-toolbar .btn {
  369. font-size: 0.9rem;
  370. padding: 10px 14px 9px;
  371. border: none;
  372. }
  373. .btn-toolbar .btn:first-child {
  374. border-radius: 6px 0 0 6px;
  375. }
  376. .btn-toolbar .btn:last-child {
  377. border-radius: 0 6px 6px 0;
  378. }
  379. .btn-toolbar .btn.btn-primary:hover,
  380. .btn-toolbar .btn.btn-primary:focus {
  381. background-color: $sta-primary-light !important;
  382. }
  383. .btn-toolbar .btn.btn-primary:active,
  384. .btn-toolbar .btn.btn-primary.active {
  385. background-color: $sta-primary-dark !important;
  386. }
  387. .btn-primary:not(:disabled):not(.disabled).active:focus,
  388. .btn-primary:not(:disabled):not(.disabled):active:focus,
  389. .show > .btn-primary.dropdown-toggle:focus {
  390. box-shadow: 0 0 0 .2rem $sta-primary-light;
  391. }
  392. /*************************************************
  393. * Tables
  394. **************************************************/
  395. table {
  396. width: 100%;
  397. max-width: 100%;
  398. margin-bottom: 1rem;
  399. font-size: 0.93rem;
  400. }
  401. table > thead > tr > th,
  402. table > tbody > tr > th,
  403. table > tfoot > tr > th,
  404. table > thead > tr > td,
  405. table > tbody > tr > td,
  406. table > tfoot > tr > td {
  407. padding: 8px;
  408. line-height: 1.43;
  409. vertical-align: top;
  410. border-top: 1px solid #ddd;
  411. }
  412. table > thead > tr > th {
  413. vertical-align: bottom;
  414. border-bottom: 2px solid #ddd;
  415. }
  416. table > caption + thead > tr:first-child > th,
  417. table > colgroup + thead > tr:first-child > th,
  418. table > thead:first-child > tr:first-child > th,
  419. table > caption + thead > tr:first-child > td,
  420. table > colgroup + thead > tr:first-child > td,
  421. table > thead:first-child > tr:first-child > td {
  422. border-top: 0;
  423. }
  424. table > tbody + tbody {
  425. border-top: 2px solid #ddd;
  426. }
  427. table table {
  428. background-color: #fff;
  429. }
  430. /* Table Striped */
  431. table > tbody > tr:nth-child(odd) > td,
  432. table > tbody > tr:nth-child(odd) > th {
  433. background-color: #f9f9f9;
  434. }
  435. /* Table Hover */
  436. table > tbody > tr:hover > td,
  437. table > tbody > tr:hover > th {
  438. background-color: #e5e5e5;
  439. }
  440. /*************************************************
  441. * Alerts
  442. **************************************************/
  443. div.alert > div {
  444. position: relative;
  445. display: block;
  446. font-size: 1rem;
  447. margin-left: 2rem;
  448. margin-top: 0;
  449. margin-bottom: 0;
  450. }
  451. div.alert div > * {
  452. margin-bottom: .5rem; /* Use smaller paragraph spacing than usual. */
  453. }
  454. div.alert div > :last-child {
  455. margin-bottom: 0;
  456. }
  457. div.alert > div:first-child::before {
  458. position: absolute;
  459. top: -0.5rem;
  460. left: -2rem;
  461. font-size: 1.5rem;
  462. color: #209cee;
  463. font-family: 'Font Awesome 5 Free';
  464. font-weight: 900;
  465. content: '\f05a';
  466. width: 1.5rem;
  467. text-align: center;
  468. }
  469. div.alert-warning > div:first-child::before {
  470. font-family: 'Font Awesome 5 Free';
  471. font-weight: 900;
  472. color: #ff3860;
  473. content: '\f071';
  474. }
  475. div.alert a {
  476. color: currentColor;
  477. text-decoration: none;
  478. border-bottom: solid 1px currentColor;
  479. }
  480. .alert-note {
  481. color: #12537e;
  482. background-color: #f6fbfe;
  483. border-color: #209cee;
  484. }
  485. .alert-warning {
  486. color: #cd0930;
  487. background-color: #fff5f7;
  488. border-color: #ff3860;
  489. }