markdown.less 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. // Markdown output
  2. // -------------------------
  3. .markdown {
  4. margin: 0px;
  5. overflow: auto;
  6. &>:first-child {
  7. margin-top: 0px;
  8. }
  9. &>:last-child {
  10. margin-bottom: 0px;
  11. }
  12. h1 {
  13. font-size: @baseFontSize * 2;
  14. }
  15. h2 {
  16. font-size: @baseFontSize * 1.7;
  17. }
  18. h3 {
  19. font-size: @baseFontSize * 1.5;
  20. }
  21. h4 {
  22. font-size: @baseFontSize * 1.2;
  23. }
  24. hr {
  25. border: none;
  26. border-top: 1px solid @hrBorder;
  27. margin: @baseLineHeight 0px;
  28. }
  29. blockquote {
  30. background-color: darken(@postBackground, 1%);
  31. border: 1px solid darken(@postBackground, 6%);
  32. border-radius: @baseBorderRadius;
  33. padding: @baseFontSize;
  34. &>h3:first-child {
  35. margin: 0px;
  36. margin-bottom: @baseLineHeight / 2;
  37. padding: 0px;
  38. font-size: @baseFontSize;
  39. line-height: @baseLineHeight;
  40. }
  41. &>:first-child {
  42. margin-top: 0px;
  43. }
  44. &>:last-child {
  45. margin-bottom: 0px;
  46. }
  47. p {
  48. margin: 0 0 @baseLineHeight / 2;
  49. font-size: @fontSizeSmall;
  50. }
  51. blockquote {
  52. background-color: @postBackground;
  53. border: 1px solid darken(@postBackground, 5%);
  54. border-radius: @baseBorderRadius;
  55. padding: @baseFontSize;
  56. }
  57. }
  58. code {
  59. background-color: @grayDark;
  60. border: none;
  61. color: @grayLighter;
  62. font-size: @baseFontSize;
  63. }
  64. pre {
  65. background-color: @grayDarker;
  66. padding: (@baseFontSize / 2) @baseFontSize;
  67. code {
  68. background: none;
  69. border: none;
  70. color: @grayLighter;
  71. font-size: @fontSizeSmall;
  72. }
  73. }
  74. img {
  75. border-radius: @baseBorderRadius;
  76. box-shadow: 0px 0px 4px @gray;
  77. margin: (@baseLineHeight / 2) 0px;
  78. }
  79. .md-img {
  80. overflow: auto;
  81. .md-img-span {
  82. margin: (@baseLineHeight / 2) 0px;
  83. float: none;
  84. .md-img-wrap {
  85. background-color: @grayLighter;
  86. border: 1px solid @white;
  87. border-radius: @baseBorderRadius + 1px;
  88. box-shadow: 0px 0px 2px @grayLight;
  89. margin: 3px;
  90. .md-img-bg {
  91. background-color: @white;
  92. border-radius: @baseBorderRadius;
  93. padding: (@baseLineHeight / 2);
  94. text-align: center;
  95. img {
  96. border-radius: @baseBorderRadius;
  97. box-shadow: none;
  98. }
  99. .md-img-error {
  100. background: url('../img/img_broken.jpg');
  101. border-radius: @baseBorderRadius;
  102. padding: (@baseLineHeight * 2.5) 0px;
  103. span {
  104. background-color: @grayDark;
  105. border-radius: @borderRadiusLarge;
  106. .opacity(80);
  107. padding: (@baseFontSize / 2) @baseFontSize;
  108. margin: 0px auto;
  109. color: @white;
  110. text-shadow: 0px 1px 0px @black;
  111. }
  112. }
  113. }
  114. .md-img-label {
  115. display: block;
  116. padding: (@baseFontSize / 2) @baseFontSize;
  117. color: @grayDark;
  118. &:hover, &:active {
  119. color: @textColor;
  120. text-decoration: none;
  121. }
  122. }
  123. }
  124. }
  125. }
  126. // Blocks margins
  127. pre, blockquote, iframe {
  128. margin-top: @baseLineHeight;
  129. margin-bottom: @baseLineHeight;
  130. &>:first-child {
  131. margin-top: 0px;
  132. }
  133. &>:last-child {
  134. margin-bottom: 0px;
  135. }
  136. }
  137. }