mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 03:24:54 +00:00
119 lines
2.7 KiB
CSS
119 lines
2.7 KiB
CSS
[data-component="attachment-card"] {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
box-sizing: border-box;
|
|
width: 160px;
|
|
min-width: 160px;
|
|
max-width: 160px;
|
|
padding: 8px;
|
|
border-radius: 6px;
|
|
background: var(--v2-overlay-simple-overlay-hover);
|
|
box-shadow: inset 0 0 0 0.5px var(--v2-border-border-base);
|
|
cursor: default;
|
|
|
|
&[data-wide] {
|
|
width: 100%;
|
|
min-width: 0;
|
|
max-width: none;
|
|
}
|
|
|
|
&[data-surface="base"] {
|
|
background: var(--v2-background-bg-base);
|
|
}
|
|
|
|
&[data-active] {
|
|
box-shadow: inset 0 0 0 0.5px var(--v2-border-border-strong);
|
|
}
|
|
|
|
&[data-clickable] {
|
|
cursor: pointer;
|
|
}
|
|
|
|
[data-slot="attachment-card-title"],
|
|
[data-slot="attachment-card-subtitle"] {
|
|
max-width: 100%;
|
|
font-family: var(--v2-font-family-sans, "Inter", sans-serif);
|
|
font-style: normal;
|
|
font-size: 11px;
|
|
/* Inter's descenders need 14px at 11px; a tighter line box clips them where the text truncates. */
|
|
line-height: 14px;
|
|
letter-spacing: 0.05px;
|
|
font-variation-settings: "slnt" 0;
|
|
}
|
|
|
|
[data-slot="attachment-card-title"] {
|
|
width: 100%;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
font-weight: 530;
|
|
color: var(--v2-text-text-base);
|
|
}
|
|
|
|
[data-slot="attachment-card-subtitle"] {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
min-width: 0;
|
|
min-height: 16px;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
font-weight: 440;
|
|
color: var(--v2-text-text-muted);
|
|
|
|
[data-component="file-icon"],
|
|
[data-slot="icon-svg"] {
|
|
width: 12px;
|
|
height: 12px;
|
|
flex: none;
|
|
}
|
|
|
|
[data-slot="attachment-card-label"] {
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
}
|
|
}
|
|
|
|
[data-component="attachment-card"] {
|
|
[data-slot="comment-card-quote"],
|
|
[data-slot="comment-card-action"] {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
min-width: 0;
|
|
}
|
|
|
|
[data-slot="comment-card-action"] {
|
|
display: none;
|
|
color: var(--v2-text-text-base);
|
|
}
|
|
}
|
|
|
|
@media (hover: hover) {
|
|
[data-component="attachment-card"]:hover:has([data-slot="comment-card-action"]) [data-slot="comment-card-quote"] {
|
|
display: none;
|
|
}
|
|
|
|
[data-component="attachment-card"]:hover [data-slot="comment-card-action"] {
|
|
display: flex;
|
|
}
|
|
}
|
|
|
|
@media (hover: none) {
|
|
[data-component="attachment-card"]:has([data-slot="comment-card-action"]:not([data-commented]))
|
|
[data-slot="comment-card-quote"] {
|
|
display: none;
|
|
}
|
|
|
|
[data-component="attachment-card"] [data-slot="comment-card-action"]:not([data-commented]) {
|
|
display: flex;
|
|
}
|
|
}
|
|
|
|
[data-color-scheme="dark"] [data-component="attachment-card"][data-surface="base"] {
|
|
background: var(--v2-overlay-simple-overlay-hover);
|
|
}
|