app.scss 11 KB

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