opencode/packages/ui/src/components/markdown.css

118 lines
2.2 KiB
CSS
Raw Normal View History

2025-10-31 02:49:29 +08:00
[data-component="markdown"] {
min-width: 0;
max-width: 100%;
2025-11-19 05:02:18 +08:00
overflow: hidden;
2025-10-31 02:49:29 +08:00
color: var(--text-base);
2025-11-01 00:54:27 +08:00
text-wrap: pretty;
2025-10-31 02:49:29 +08:00
2025-12-16 19:48:52 +08:00
strong {
font-weight: var(--font-weight-medium);
}
2025-11-01 04:37:45 +08:00
/* text-12-regular */
2025-10-31 02:49:29 +08:00
font-family: var(--font-family-sans);
2025-12-16 19:48:52 +08:00
font-size: var(--font-size-base);
2025-10-31 02:49:29 +08:00
font-style: normal;
font-weight: var(--font-weight-regular);
2025-12-16 19:48:52 +08:00
line-height: var(--line-height-large);
2025-10-31 02:49:29 +08:00
letter-spacing: var(--letter-spacing-normal);
2025-12-16 19:48:52 +08:00
h1 {
margin-top: 40px;
font-weight: var(--font-weight-medium);
color: var(--text-strong);
strong {
font-weight: var(--font-weight-medium);
}
}
h2 {
margin-top: 32px;
font-weight: var(--font-weight-medium);
color: var(--text-strong);
strong {
font-weight: var(--font-weight-medium);
}
}
2025-10-31 02:54:52 +08:00
h3 {
2025-12-16 19:48:52 +08:00
margin-top: 24px;
2025-10-31 02:54:52 +08:00
font-weight: var(--font-weight-medium);
2025-12-16 19:48:52 +08:00
color: var(--text-strong);
strong {
font-weight: var(--font-weight-medium);
}
}
h1 {
font-size: 15px;
2025-10-31 02:54:52 +08:00
}
p {
2025-12-16 19:48:52 +08:00
margin-top: 16px;
2025-10-31 02:54:52 +08:00
margin-bottom: 8px;
}
ul,
ol {
margin-top: 16px;
2025-12-16 19:48:52 +08:00
li {
margin-bottom: 12px;
line-height: var(--line-height-large);
}
li:last-child {
margin-bottom: 0;
}
2025-10-31 02:54:52 +08:00
}
2025-11-01 00:54:27 +08:00
hr {
margin-top: 8px;
margin-bottom: 16px;
border-color: var(--border-weaker-base);
}
2025-11-19 05:02:18 +08:00
2025-12-16 19:48:52 +08:00
.shiki {
font-size: 13px;
background: var(--surface-raised-base) !important; /* temporary fix to test style */
padding: 8px 12px;
border-radius: 4px;
border: 0.5px solid var(--border-weak-base);
}
2025-11-19 05:02:18 +08:00
pre {
margin-top: 2rem;
margin-bottom: 2rem;
overflow: auto;
scrollbar-width: none;
&::-webkit-scrollbar {
display: none;
}
}
2025-11-26 03:11:21 +08:00
:not(pre) > code {
font-family: var(--font-family-mono);
font-feature-settings: var(--font-family-mono--font-feature-settings);
2025-12-16 19:48:52 +08:00
font-size: 13px;
2025-11-26 03:11:21 +08:00
/* background-color: var(--surface-base-strong); */
/* padding: 0.15em 0.35em; */
/* border-radius: var(--radius-sm); */
padding: 2px 2px;
margin: 0 1.5px;
border-radius: 2px;
background: var(--surface-base);
box-shadow: 0 0 0 0.5px var(--border-weak-base);
/* &::before, */
/* &::after { */
/* content: "\`"; */
/* } */
}
2025-10-31 02:49:29 +08:00
}