_markdown.scss 3.2 KB

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