app.scss 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577
  1. /* THEME SPECIFIC STYLES */
  2. .contents {
  3. color: mc('grey', '800');
  4. padding: 24px 0 50px;
  5. position: relative;
  6. > div > *:first-child {
  7. margin-top: 0;
  8. }
  9. @at-root .theme--dark & {
  10. background-color: darken(mc('grey', '900'), 4%);
  11. color: mc('grey', '300');
  12. a {
  13. color: mc('indigo', '200');
  14. }
  15. }
  16. // ---------------------------------
  17. // HEADERS
  18. // ---------------------------------
  19. h1, h2, h3, h4, h5, h6 {
  20. position: relative;
  21. &:first-child {
  22. padding-top: 0;
  23. }
  24. &:hover {
  25. .toc-anchor {
  26. display: block;
  27. }
  28. }
  29. .toc-anchor {
  30. display: none;
  31. position: absolute;
  32. right: 1rem;
  33. bottom: .5rem;
  34. font-size: 1.25rem;
  35. text-decoration: none;
  36. color: mc('grey', '500');
  37. }
  38. & + h2, & + h3, & + h4, & + h5, & + h6 {
  39. margin-top: 8px;
  40. }
  41. }
  42. h1 {
  43. padding: 0 24px;
  44. color: mc('blue', '800');
  45. margin-top: 2rem;
  46. position: relative;
  47. @at-root .theme--dark & {
  48. color: mc('teal', '100');
  49. }
  50. &::after {
  51. content: '';
  52. position: absolute;
  53. bottom: 0;
  54. left: 0;
  55. width: 100%;
  56. height: 2px;
  57. background: linear-gradient(to right, mc('theme', 'primary'), rgba(mc('theme', 'primary'), 0));
  58. @at-root .theme--dark & {
  59. background: linear-gradient(to right, mc('teal', '300') 0%, mc('teal', '500') 10%, rgba(mc('teal', '900'), 0) 100%);
  60. }
  61. @at-root .application--is-rtl & {
  62. background: linear-gradient(to left, mc('theme', 'primary'), rgba(mc('theme', 'primary'), 0));
  63. }
  64. @at-root .theme--dark.application--is-rtl & {
  65. background: linear-gradient(to left, mc('grey', '600'), rgba(mc('grey', '600'), 0));
  66. }
  67. }
  68. }
  69. h2 {
  70. margin: 1rem 24px 0 24px;
  71. padding: 8px 0 0 0;
  72. color: mc('grey', '800');
  73. position: relative;
  74. @at-root .theme--dark & {
  75. color: mc('grey', '400');
  76. }
  77. &::after {
  78. content: '';
  79. position: absolute;
  80. bottom: 0;
  81. left: 0;
  82. width: 100%;
  83. height: 1px;
  84. background: linear-gradient(to right, mc('grey', '700'), rgba(mc('grey', '700'), 0));
  85. @at-root .theme--dark & {
  86. background: linear-gradient(to right, mc('grey', '300'), rgba(mc('grey', '700'), 0));
  87. }
  88. @at-root .application--is-rtl & {
  89. background: linear-gradient(to left, mc('grey', '700'), rgba(mc('grey', '700'), 0));
  90. }
  91. @at-root .theme--dark.application--is-rtl & {
  92. background: linear-gradient(to left, mc('grey', '300'), rgba(mc('grey', '700'), 0));
  93. }
  94. }
  95. }
  96. h3 {
  97. margin: 0 24px;
  98. padding: 8px 0 0 0;
  99. color: mc('grey', '700');
  100. position: relative;
  101. @at-root .theme--dark & {
  102. color: mc('grey', '600');
  103. }
  104. &::after {
  105. content: '';
  106. position: absolute;
  107. bottom: 0;
  108. left: 0;
  109. width: 100%;
  110. height: 1px;
  111. background: linear-gradient(to right, mc('grey', '500'), rgba(mc('grey', '500'), 0) 90%);
  112. }
  113. }
  114. h4, h5, h6 {
  115. font-size: 1rem;
  116. margin: 0 24px;
  117. padding: 8px 0 0 0;
  118. color: mc('grey', '700');
  119. position: relative;
  120. @at-root .theme--dark & {
  121. color: mc('grey', '600');
  122. }
  123. &::after {
  124. content: '';
  125. position: absolute;
  126. bottom: 0;
  127. left: 0;
  128. width: 100%;
  129. height: 1px;
  130. background: linear-gradient(to right, mc('grey', '500'), rgba(mc('grey', '500'), 0) 70%);
  131. }
  132. }
  133. h5 {
  134. &::after {
  135. background: linear-gradient(to right, mc('grey', '500'), rgba(mc('grey', '500'), 0) 50%);
  136. }
  137. }
  138. h6 {
  139. &::after {
  140. background: linear-gradient(to right, mc('grey', '500'), rgba(mc('grey', '500'), 0) 30%);
  141. }
  142. }
  143. // ---------------------------------
  144. // PARAGRAPHS
  145. // ---------------------------------
  146. p {
  147. padding: 1rem 24px 0 24px;
  148. margin: 0;
  149. text-align: justify;
  150. @at-root .contents > div > p:first-child {
  151. padding-top: 0;
  152. }
  153. }
  154. hr {
  155. margin: 1rem;
  156. height: 1px;
  157. border: none;
  158. background-color: mc('grey', '400');
  159. @at-root .theme--dark & {
  160. background-color: mc('grey', '700');
  161. }
  162. }
  163. .emoji {
  164. height: 1.25em;
  165. margin: 0 1px -4px;
  166. }
  167. blockquote {
  168. padding: 0 0 1rem 0;
  169. border-left: 5px solid mc('blue', '500');
  170. border-radius: .5rem;
  171. margin: 1rem 2rem;
  172. > p:first-child .emoji {
  173. margin-right: .5rem;
  174. }
  175. &.valign-center > p {
  176. display: flex;
  177. align-items: center;
  178. }
  179. &.is-info {
  180. background-color: mc('blue', '50');
  181. background-image: radial-gradient(ellipse at top, mc('blue', '50'), lighten(mc('blue', '50'), 5%));
  182. border-color: mc('blue', '100');
  183. box-shadow: 0 0 2px 0 mc('blue', '100');
  184. code {
  185. background-color: mc('blue', '50');
  186. color: mc('blue', '800');
  187. }
  188. @at-root .theme--dark & {
  189. background-color: mc('grey', '900');
  190. background-image: radial-gradient(ellipse at top, mc('blue', '900'), rgba(darken(mc('blue', '900'), 5%), .2));
  191. border-color: mc('blue', '500');
  192. box-shadow: 0 0 2px 0 mc('grey', '900');
  193. }
  194. }
  195. &.is-warning {
  196. background-color: mc('orange', '50');
  197. background-image: radial-gradient(ellipse at top, mc('orange', '50'), lighten(mc('orange', '50'), 5%));
  198. border-color: mc('orange', '100');
  199. box-shadow: 0 0 2px 0 mc('orange', '100');
  200. code {
  201. background-color: mc('orange', '50');
  202. color: mc('orange', '800');
  203. }
  204. @at-root .theme--dark & {
  205. background-color: mc('grey', '900');
  206. background-image: radial-gradient(ellipse at top, mc('orange', '900'), rgba(darken(mc('orange', '900'), 5%), .2));
  207. border-color: mc('orange', '500');
  208. box-shadow: 0 0 2px 0 mc('grey', '900');
  209. }
  210. }
  211. &.is-danger {
  212. background-color: mc('red', '50');
  213. background-image: radial-gradient(ellipse at top, mc('red', '50'), lighten(mc('red', '50'), 5%));
  214. border-color: mc('red', '100');
  215. box-shadow: 0 0 2px 0 mc('red', '100');
  216. code {
  217. background-color: mc('red', '50');
  218. color: mc('red', '800');
  219. }
  220. @at-root .theme--dark & {
  221. background-color: mc('grey', '900');
  222. background-image: radial-gradient(ellipse at top, mc('red', '900'), rgba(darken(mc('red', '900'), 5%), .2));
  223. border-color: mc('red', '500');
  224. box-shadow: 0 0 2px 0 mc('grey', '900');
  225. }
  226. }
  227. &.is-success {
  228. background-color: mc('green', '50');
  229. background-image: radial-gradient(ellipse at top, mc('green', '50'), lighten(mc('green', '50'), 5%));
  230. border-color: mc('green', '100');
  231. box-shadow: 0 0 2px 0 mc('green', '100');
  232. code {
  233. background-color: mc('green', '50');
  234. color: mc('green', '800');
  235. }
  236. @at-root .theme--dark & {
  237. background-color: mc('grey', '900');
  238. background-image: radial-gradient(ellipse at top, mc('green', '900'), rgba(darken(mc('green', '900'), 5%), .2));
  239. border-color: mc('green', '500');
  240. box-shadow: 0 0 2px 0 mc('grey', '900');
  241. }
  242. }
  243. }
  244. // ---------------------------------
  245. // LISTS
  246. // ---------------------------------
  247. ol, ul {
  248. padding: 1rem 24px 0 24px;
  249. list-style-position: inside;
  250. li + li {
  251. margin-top: .5rem;
  252. }
  253. &.links-list {
  254. li {
  255. background-color: mc('grey', '50');
  256. background-image: linear-gradient(to bottom, #FFF, mc('grey', '50'));
  257. border-right: 1px solid mc('grey', '200');
  258. border-bottom: 1px solid mc('grey', '200');
  259. border-left: 5px solid mc('grey', '300');
  260. box-shadow: 0 3px 8px 0 rgba(116, 129, 141, 0.1);
  261. padding: 1rem;
  262. border-radius: 5px;
  263. font-weight: 500;
  264. &:hover {
  265. background-image: linear-gradient(to bottom, #FFF, lighten(mc('blue', '50'), 4%));
  266. border-left-color: mc('blue', '500');
  267. cursor: pointer;
  268. }
  269. &::before {
  270. content: '';
  271. display: none;
  272. }
  273. > a {
  274. display: block;
  275. text-decoration: none;
  276. margin: -1rem;
  277. padding: 1rem;
  278. > em {
  279. font-weight: 400;
  280. font-style: normal;
  281. color: mc('grey', '700');
  282. display: inline-block;
  283. padding-left: .5rem;
  284. border-left: 1px solid mc('grey', '300');
  285. margin-left: .5rem;
  286. &.is-block {
  287. display: block;
  288. padding-left: 0;
  289. margin-left: 0;
  290. border-left: none;
  291. }
  292. }
  293. }
  294. > em {
  295. font-weight: 400;
  296. font-style: normal;
  297. }
  298. @at-root .theme--dark & {
  299. background-color: mc('grey', '50');
  300. background-image: linear-gradient(to bottom, lighten(mc('grey', '900'), 5%), mc('grey', '900'));
  301. border-right: 1px solid mc('grey', '900');
  302. border-bottom: 1px solid mc('grey', '900');
  303. border-left: 5px solid mc('grey', '700');
  304. box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.1);
  305. &:hover {
  306. background-image: linear-gradient(to bottom, lighten(mc('grey', '900'), 2%), darken(mc('grey', '900'), 3%));
  307. border-left-color: mc('indigo', '300');
  308. cursor: pointer;
  309. }
  310. }
  311. }
  312. }
  313. &.grid-list {
  314. margin: 1rem 24px 0 24px;
  315. background-color: #FFF;
  316. border: 1px solid mc('grey', '200');
  317. padding: 1px;
  318. display: inline-block;
  319. @at-root .theme--dark & {
  320. background-color: #000;
  321. border: 1px solid mc('grey', '800');
  322. }
  323. li {
  324. background-color: mc('grey', '50');
  325. padding: .6rem 1rem;
  326. display: block;
  327. &:nth-child(odd) {
  328. background-color: mc('grey', '100');
  329. }
  330. & + li {
  331. margin-top: 0;
  332. }
  333. &::before {
  334. content: '';
  335. display: none;
  336. }
  337. @at-root .theme--dark & {
  338. background-color: mc('grey', '900');
  339. &:nth-child(odd) {
  340. background-color: darken(mc('grey', '900'), 5%);
  341. }
  342. }
  343. }
  344. }
  345. }
  346. ul {
  347. list-style: none;
  348. > li::before {
  349. content: '\25b8';
  350. color: mc('grey', '600');
  351. display: inline-block;
  352. width: 1.35rem;
  353. }
  354. }
  355. // ---------------------------------
  356. // CODE
  357. // ---------------------------------
  358. code {
  359. background-color: mc('indigo', '50');
  360. padding: 0 5px;
  361. color: mc('indigo', '800');
  362. font-family: 'Roboto Mono', monospace;
  363. font-weight: normal;
  364. font-size: 1rem;
  365. box-shadow: none;
  366. &::before, &::after {
  367. display: none;
  368. }
  369. @at-root .theme--dark & {
  370. background-color: darken(mc('grey', '900'), 5%);
  371. color: mc('indigo', '100');
  372. }
  373. }
  374. .prismjs{
  375. border: none;
  376. border-radius: 5px;
  377. box-shadow: initial;
  378. background-color: mc('grey', '900');
  379. padding: 1rem 1rem 1rem 3rem;
  380. margin: 1rem 24px;
  381. @at-root .theme--dark & {
  382. background-color: darken(mc('grey', '900'), 5%);
  383. }
  384. > code {
  385. background-color: transparent;
  386. padding: 0;
  387. color: #FFF;
  388. box-shadow: initial;
  389. display: block;
  390. font-size: .85rem;
  391. font-family: 'Roboto Mono', monospace;
  392. &:after, &:before {
  393. content: initial;
  394. letter-spacing: initial;
  395. }
  396. }
  397. }
  398. // ---------------------------------
  399. // TASK LISTS
  400. // ---------------------------------
  401. .task-list-item {
  402. position: relative;
  403. list-style-type: none;
  404. &-checkbox[disabled] {
  405. display: none;
  406. & + label {
  407. padding-left: 1.5rem;
  408. }
  409. & + label::before {
  410. position: absolute;
  411. left: 0;
  412. top: 2px;
  413. content: ' ';
  414. display: block;
  415. width: 1.1rem;
  416. height: 1.1rem;
  417. background-color: #FFF;
  418. border: 1px solid mc('grey', '400');
  419. border-radius: 2px;
  420. font-weight: bold;
  421. font-size: .8rem;
  422. line-height: 1rem;
  423. text-align: center;
  424. @at-root .theme--dark & {
  425. background-color: mc('grey', '900');
  426. border-color: mc('grey', '700');
  427. }
  428. }
  429. &[checked] + label::before {
  430. content: '✓';
  431. }
  432. }
  433. .contains-task-list {
  434. padding: .5rem 0 0 1.5rem;
  435. }
  436. }
  437. // ---------------------------------
  438. // TABLES
  439. // ---------------------------------
  440. table {
  441. margin: .5rem 1.75rem;
  442. border-spacing: 0;
  443. th {
  444. padding: .75rem;
  445. border-bottom: 2px solid mc('grey', '500');
  446. color: mc('grey', '600');
  447. }
  448. td {
  449. padding: .75rem;
  450. }
  451. tr {
  452. td {
  453. border-bottom: 1px solid mc('grey', '200');
  454. }
  455. }
  456. }
  457. // ---------------------------------
  458. // IMAGES
  459. // ---------------------------------
  460. img {
  461. max-width: 100%;
  462. &.align-left {
  463. float: left;
  464. margin: 0 1rem 1rem 0;
  465. }
  466. &.align-right {
  467. float: right;
  468. margin: 0 0 1rem 1rem;
  469. }
  470. &.align-center {
  471. display: block;
  472. max-width: 100%;
  473. margin: auto;
  474. }
  475. &.align-abstopright {
  476. position: absolute;
  477. top: calc(-90px + 1rem);
  478. right: 1rem;
  479. height: calc(90px - 2rem);
  480. width: auto;
  481. }
  482. &.decor-shadow {
  483. box-shadow: 0 3px 8px 0 rgba(116, 129, 141, 0.1);
  484. }
  485. &.decor-outline {
  486. border: 1px solid mc('grey', '400');
  487. }
  488. }
  489. }