_markdown.scss 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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. }
  35. h3.member-title {
  36. margin-top: 6px;
  37. margin-left: 6px;
  38. padding: 2px 6px;
  39. @include codelike;
  40. }
  41. h4 {
  42. margin-top: 32px;
  43. }
  44. h1, h2, h3, h4, h5 {
  45. font-family: $brand-font-face;
  46. font-weight: 400;
  47. line-height: 1.25;
  48. &[id]:target:before {
  49. display: block;
  50. content: " ";
  51. margin-top: -75px; // Set the Appropriate Height
  52. height: 75px; // Set the Appropriate Height
  53. visibility: hidden;
  54. }
  55. &[id]:target {
  56. text-decoration: underline;
  57. }
  58. }
  59. b, optgroup, strong {
  60. font-weight: 700;
  61. }
  62. a {
  63. text-decoration: none;
  64. &:hover {
  65. text-decoration: underline;
  66. }
  67. }
  68. li {
  69. margin-bottom: 6px;
  70. }
  71. code:not([data-lang]) {
  72. font-family: 'Source Code Pro', monospace;
  73. padding: 0 $padding-4;
  74. background: $color-code-bg;
  75. color: $color-code-text;
  76. border-radius: $block-border-radius;
  77. border: 1px solid $color-code-border;
  78. }
  79. pre:not(.chroma) {
  80. padding: $padding-16;
  81. background: $color-code-bg;
  82. border-radius: $block-border-radius;
  83. font-size: $font-size-14;
  84. overflow-x: auto;
  85. code {
  86. color: $color-code-text;
  87. background: none;
  88. padding: none;
  89. }
  90. }
  91. blockquote {
  92. margin: 0;
  93. padding: $padding-16 $padding-16;
  94. position: relative;
  95. font-size: 22px;
  96. color: $gray-700;
  97. :first-child { margin-top: 0; }
  98. :last-child { margin-bottom: 0; }
  99. ::before {
  100. content: '“';
  101. position: absolute;
  102. font-family: Georgia, 'Times New Roman', Times, serif;
  103. font-size: 48px;
  104. top: 0px;
  105. left: -6px;
  106. color: $gray-500;
  107. }
  108. }
  109. table {
  110. width: 100%;
  111. th {
  112. text-align: left;
  113. }
  114. td, th {
  115. padding: $padding-4;
  116. }
  117. tr:nth-child(odd) td {
  118. background-color: $gray-100;
  119. }
  120. }
  121. }