markdown.css 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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-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. li {
  60. margin-bottom: 0.25rem;
  61. }
  62. li::marker {
  63. color: var(--text-weak);
  64. }
  65. /* Nested lists spacing */
  66. li > ul,
  67. li > ol {
  68. margin-top: 0.25rem;
  69. margin-bottom: 0.25rem;
  70. padding-left: 1rem; /* Minimal indent for nesting only */
  71. }
  72. /* Blockquotes */
  73. blockquote {
  74. border-left: 2px solid var(--border-weak-base);
  75. margin: 1.5rem 0;
  76. padding-left: 0.5rem;
  77. color: var(--text-weak);
  78. font-style: normal;
  79. }
  80. /* Horizontal Rule - Invisible spacing only */
  81. hr {
  82. border: none;
  83. height: 0;
  84. margin: 2.5rem 0;
  85. }
  86. .shiki {
  87. font-size: 13px;
  88. padding: 8px 12px;
  89. border-radius: 4px;
  90. border: 0.5px solid var(--border-weak-base);
  91. }
  92. pre {
  93. margin-top: 2rem;
  94. margin-bottom: 2rem;
  95. overflow: auto;
  96. scrollbar-width: none;
  97. &::-webkit-scrollbar {
  98. display: none;
  99. }
  100. }
  101. :not(pre) > code {
  102. font-family: var(--font-family-mono);
  103. font-feature-settings: var(--font-family-mono--font-feature-settings);
  104. font-size: 13px;
  105. padding: 2px 2px;
  106. margin: 0 1.5px;
  107. border-radius: 2px;
  108. background: var(--surface-base);
  109. box-shadow: 0 0 0 0.5px var(--border-weak-base);
  110. }
  111. /* Tables */
  112. table {
  113. width: 100%;
  114. border-collapse: collapse;
  115. margin: 1.5rem 0;
  116. font-size: var(--font-size-base);
  117. }
  118. th,
  119. td {
  120. /* Minimal borders for structure, matching TUI "lines" roughly but keeping it web-clean */
  121. border-bottom: 1px solid var(--border-weaker-base);
  122. padding: 0.75rem 0.5rem;
  123. text-align: left;
  124. vertical-align: top;
  125. }
  126. th {
  127. color: var(--text-strong);
  128. font-weight: var(--font-weight-medium);
  129. border-bottom: 1px solid var(--border-weak-base);
  130. }
  131. /* Images */
  132. img {
  133. max-width: 100%;
  134. height: auto;
  135. border-radius: 4px;
  136. margin: 1.5rem 0;
  137. display: block;
  138. }
  139. }