markdown.less 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. // Markdown output
  2. // -------------------------
  3. .markdown, .markdown article {
  4. margin: 0px;
  5. overflow: auto;
  6. &>:first-child {
  7. margin-top: 0px;
  8. }
  9. &>:last-child {
  10. margin-bottom: 0px;
  11. img:last-child {
  12. margin-bottom: 0px;
  13. }
  14. }
  15. h1 {
  16. font-size: @baseFontSize * 1.7;
  17. }
  18. h2 {
  19. font-size: @baseFontSize * 1.5;
  20. }
  21. h3 {
  22. font-size: @baseFontSize * 1.2;
  23. }
  24. h4 {
  25. font-size: @baseFontSize;
  26. }
  27. hr {
  28. border: none;
  29. border-top: 1px solid @hrBorder;
  30. margin: @baseLineHeight 0px;
  31. }
  32. blockquote {
  33. border-left-color: darken(@grayLighter, 5%);
  34. padding: (@baseFontSize / 3) @baseFontSize;
  35. header {
  36. padding-bottom: (@baseLineHeight / 2);
  37. font-size: @baseFontSize * 1.1;
  38. font-weight: bold;
  39. line-height: @baseLineHeight;
  40. }
  41. p {
  42. margin: 0 0 (@baseLineHeight / 2);
  43. font-size: @baseFontSize;
  44. }
  45. blockquote {
  46. .opacity(85);
  47. }
  48. }
  49. code {
  50. background-color: @grayDark;
  51. border: none;
  52. color: @grayLighter;
  53. font-size: @baseFontSize;
  54. }
  55. pre {
  56. background-color: @grayDarker;
  57. padding: (@baseFontSize / 2) @baseFontSize;
  58. code {
  59. background: none;
  60. border: none;
  61. color: @grayLighter;
  62. font-size: @fontSizeSmall;
  63. }
  64. }
  65. img {
  66. background-color: @white;
  67. border-radius: @baseBorderRadius;
  68. margin: (@baseLineHeight / 2) 0px;
  69. }
  70. // Blocks margins
  71. pre, blockquote, iframe {
  72. margin-top: @baseLineHeight;
  73. margin-bottom: @baseLineHeight;
  74. &>:first-child {
  75. margin-top: 0px;
  76. }
  77. &>:last-child {
  78. margin-bottom: 0px;
  79. }
  80. }
  81. // Emoticons
  82. .emoji {
  83. background: none;
  84. border-radius: 0px;
  85. margin: 0px;
  86. vertical-align: middle;
  87. }
  88. h1 {
  89. .emoji {
  90. width: (@baseFontSize * 1.7) + 4px;
  91. height: (@baseFontSize * 1.7) + 4px;
  92. }
  93. }
  94. h2 {
  95. .emoji {
  96. width: (@baseFontSize * 1.5) + 4px;
  97. height: (@baseFontSize * 1.5) + 4px;
  98. }
  99. }
  100. h3 {
  101. .emoji {
  102. width: (@baseFontSize * 1.2) + 4px;
  103. height: (@baseFontSize * 1.2) + 4px;
  104. }
  105. }
  106. h4 {
  107. .emoji {
  108. width: @baseFontSize + 4px;
  109. height: @baseFontSize + 4px;
  110. }
  111. }
  112. p {
  113. .emoji {
  114. width: @baseFontSize + 4px;
  115. height: @baseFontSize + 4px;
  116. }
  117. }
  118. blockquote {
  119. p {
  120. .emoji {
  121. width: @fontSizeSmall + 2px;
  122. height: @fontSizeSmall + 2px;
  123. }
  124. }
  125. }
  126. }