markdown.css 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. [data-component="markdown"] {
  2. /* Reset & Base Typography */
  3. min-width: 0;
  4. max-width: 100%;
  5. overflow-wrap: break-word;
  6. color: var(--text-base);
  7. font-family: var(--font-family-sans);
  8. font-size: var(--font-size-base); /* 14px */
  9. line-height: var(--line-height-x-large);
  10. /* Spacing for flow */
  11. > *:first-child {
  12. margin-top: 0;
  13. }
  14. > *:last-child {
  15. margin-bottom: 0;
  16. }
  17. /* Headings: Same size, distinguished by color and spacing */
  18. h1,
  19. h2,
  20. h3,
  21. h4,
  22. h5,
  23. h6 {
  24. font-size: var(--font-size-base);
  25. color: var(--text-strong);
  26. font-weight: var(--font-weight-medium);
  27. margin-top: 2rem;
  28. margin-bottom: 0.75rem;
  29. line-height: var(--line-height-large);
  30. }
  31. /* Emphasis & Strong: Neutral strong color */
  32. strong,
  33. b {
  34. color: var(--text-strong);
  35. font-weight: var(--font-weight-medium);
  36. }
  37. /* Paragraphs */
  38. p {
  39. margin-bottom: 1rem;
  40. }
  41. /* Links */
  42. a {
  43. color: var(--text-interactive-base);
  44. text-decoration: none;
  45. font-weight: inherit;
  46. }
  47. a:hover {
  48. text-decoration: underline;
  49. text-underline-offset: 2px;
  50. }
  51. /* Lists */
  52. ul,
  53. ol {
  54. margin-top: 0.5rem;
  55. margin-bottom: 1rem;
  56. padding-left: 0;
  57. list-style-position: inside;
  58. }
  59. ul {
  60. list-style-type: disc;
  61. }
  62. ol {
  63. list-style-type: decimal;
  64. }
  65. li {
  66. margin-bottom: 0.5rem;
  67. }
  68. li::marker {
  69. color: var(--text-weak);
  70. }
  71. /* Nested lists spacing */
  72. li > ul,
  73. li > ol {
  74. margin-top: 0.25rem;
  75. margin-bottom: 0.25rem;
  76. padding-left: 1rem; /* Minimal indent for nesting only */
  77. }
  78. /* Blockquotes */
  79. blockquote {
  80. border-left: 2px solid var(--border-weak-base);
  81. margin: 1.5rem 0;
  82. padding-left: 0.5rem;
  83. color: var(--text-weak);
  84. font-style: normal;
  85. }
  86. /* Horizontal Rule - Invisible spacing only */
  87. hr {
  88. border: none;
  89. height: 0;
  90. margin: 2.5rem 0;
  91. }
  92. .shiki {
  93. font-size: 13px;
  94. padding: 8px 12px;
  95. border-radius: 4px;
  96. border: 0.5px solid var(--border-weak-base);
  97. }
  98. pre {
  99. margin-top: 2rem;
  100. margin-bottom: 2rem;
  101. overflow: auto;
  102. scrollbar-width: none;
  103. &::-webkit-scrollbar {
  104. display: none;
  105. }
  106. }
  107. :not(pre) > code {
  108. font-family: var(--font-family-mono);
  109. font-feature-settings: var(--font-family-mono--font-feature-settings);
  110. color: var(--syntax-string);
  111. font-weight: var(--font-weight-medium);
  112. /* font-size: 13px; */
  113. /* padding: 2px 2px; */
  114. /* margin: 0 1.5px; */
  115. /* border-radius: 2px; */
  116. /* background: var(--surface-base); */
  117. /* box-shadow: 0 0 0 0.5px var(--border-weak-base); */
  118. }
  119. /* Tables */
  120. table {
  121. width: 100%;
  122. border-collapse: collapse;
  123. margin: 1.5rem 0;
  124. font-size: var(--font-size-base);
  125. }
  126. th,
  127. td {
  128. /* Minimal borders for structure, matching TUI "lines" roughly but keeping it web-clean */
  129. border-bottom: 1px solid var(--border-weaker-base);
  130. padding: 0.75rem 0.5rem;
  131. text-align: left;
  132. vertical-align: top;
  133. }
  134. th {
  135. color: var(--text-strong);
  136. font-weight: var(--font-weight-medium);
  137. border-bottom: 1px solid var(--border-weak-base);
  138. }
  139. /* Images */
  140. img {
  141. max-width: 100%;
  142. height: auto;
  143. border-radius: 4px;
  144. margin: 1.5rem 0;
  145. display: block;
  146. }
  147. }