markup.less 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. //
  2. // Markup styles
  3. // --------------------------------------------------
  4. // Force word wrap for user text
  5. .misago-markup {
  6. h1, h2, h3, h4, h5, h6, p {
  7. word-wrap: break-word;
  8. }
  9. }
  10. // Add upper margins for headers
  11. .misago-markup {
  12. h1, h2, h3, h4, h5, h6 {
  13. margin-top: @line-height-computed * 2;
  14. }
  15. }
  16. // Even out blocks
  17. .misago-markup>*, .misago-markup blockquote>* {
  18. margin: @line-height-computed 0px;
  19. &:first-child {
  20. margin-top: 0px;
  21. }
  22. &:last-child {
  23. margin-bottom: 0px;
  24. }
  25. }
  26. // Downscale images so they don't expand area
  27. .misago-markup img {
  28. max-width: 100%;
  29. max-height: 500px;
  30. }
  31. // Make quotes stand out a little
  32. .misago-markup .quote-block,
  33. .misago-markup blockquote {
  34. background: @gray-lighter;
  35. border: none;
  36. font-size: @font-size-base;
  37. .quote-heading {
  38. border-bottom: 1px solid darken(@gray-lighter, 8%);
  39. padding: (@line-height-computed / 2) @line-height-computed;
  40. font-size: @font-size-small;
  41. font-weight: bold;
  42. }
  43. }
  44. .misago-markup>.quote-block,
  45. .misago-markup>blockquote {
  46. border: 1px solid darken(@gray-lighter, 8%);
  47. }
  48. .misago-markup .quote-body {
  49. background: @body-bg;
  50. margin: 0px;
  51. padding: @line-height-computed;
  52. &>.quote-block, &>blockquote {
  53. border: 1px solid darken(@gray-lighter, 8%);
  54. }
  55. }
  56. // Style spoilers
  57. .misago-markup .spoiler-block {
  58. background: @gray-lighter;
  59. border: none;
  60. font-size: @font-size-base;
  61. }
  62. .misago-markup>.spoiler-block {
  63. border: 1px solid darken(@gray-lighter, 8%);
  64. position: relative;
  65. }
  66. .misago-markup .spoiler-body {
  67. background: @body-bg;
  68. margin: 0px;
  69. padding: @line-height-computed;
  70. }
  71. .misago-markup .spoiler-overlay {
  72. position: absolute;
  73. top: 0;
  74. left: 0;
  75. width: 100%;
  76. height: 100%;
  77. display: flex;
  78. align-items: center;
  79. justify-content: center;
  80. background: @body-bg;
  81. }
  82. .misago-markup .spoiler-block.revealed .spoiler-overlay {
  83. display: none;
  84. }
  85. // Add bullets to lists
  86. .misago-markup ul {
  87. list-style-type: square;
  88. li {
  89. list-style-type: square;
  90. }
  91. }
  92. .misago-markup ol {
  93. list-style-type: decimal;
  94. li {
  95. list-style-type: decimal;
  96. }
  97. }
  98. // Expand code blocks a little
  99. .misago-markup pre {
  100. background: #eee;
  101. border: none;
  102. padding: @padding-large-vertical;
  103. overflow: hidden;
  104. color: #000;
  105. code.hljs {
  106. margin: @padding-large-vertical * -1;
  107. padding: ((@line-height-computed - 1) / 2);
  108. }
  109. }