_markdown.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. @import 'variables';
  2. $block-border-radius: 4px;
  3. .markdown {
  4. line-height: 1.4;
  5. margin-left: 12px;
  6. h1:first-of-type {
  7. text-transform: capitalize;
  8. font-weight: 500;
  9. margin-top: 0;
  10. font-size: 2.8em;
  11. @media all and (max-width: $sm-breakpoint){
  12. font-size: 2em;
  13. }
  14. }
  15. h2 {
  16. margin-top: 48px;
  17. }
  18. h3 {
  19. margin-top: 36px;
  20. color: $gray-700;
  21. }
  22. h1, h2, h3, h4, h5 {
  23. font-family: $brand-font-face;
  24. font-weight: 600;
  25. line-height: 1.25;
  26. &[id]:target:before {
  27. display: block;
  28. content: " ";
  29. margin-top: -75px; // Set the Appropriate Height
  30. height: 75px; // Set the Appropriate Height
  31. visibility: hidden;
  32. }
  33. &[id]:target {
  34. text-decoration: underline;
  35. }
  36. }
  37. b, optgroup, strong {
  38. font-weight: 700;
  39. }
  40. a {
  41. text-decoration: none;
  42. &:hover {
  43. text-decoration: underline;
  44. }
  45. }
  46. li {
  47. margin-bottom: 6px;
  48. }
  49. code:not([data-lang]) {
  50. font-family: 'Source Code Pro', monospace;
  51. padding: 0 $padding-4;
  52. background: $color-code-bg;
  53. color: $color-code-text;
  54. border-radius: $block-border-radius;
  55. border: 1px solid $color-code-border;
  56. }
  57. pre:not(.chroma) {
  58. padding: $padding-16;
  59. background: $color-code-bg;
  60. border-radius: $block-border-radius;
  61. font-size: $font-size-14;
  62. overflow-x: auto;
  63. code {
  64. color: $color-code-text;
  65. background: none;
  66. padding: none;
  67. }
  68. }
  69. blockquote {
  70. margin: 0;
  71. padding: $padding-16 $padding-16;
  72. position: relative;
  73. font-size: 22px;
  74. color: $gray-700;
  75. :first-child { margin-top: 0; }
  76. :last-child { margin-bottom: 0; }
  77. ::before {
  78. content: '“';
  79. position: absolute;
  80. font-family: Georgia, 'Times New Roman', Times, serif;
  81. font-size: 48px;
  82. top: 0px;
  83. left: -6px;
  84. color: $gray-500;
  85. }
  86. }
  87. table {
  88. width: 100%;
  89. th {
  90. text-align: left;
  91. }
  92. td, th {
  93. padding: $padding-4;
  94. }
  95. tr:nth-child(odd) td {
  96. background-color: $gray-100;
  97. }
  98. }
  99. }