mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
428 lines
9.7 KiB
CSS
428 lines
9.7 KiB
CSS
[data-component="dock-prompt"][data-kind="question"] {
|
|
--v2-question-answer-bg-selected: light-dark(#f5f8ff, #7698fd26);
|
|
|
|
max-block-size: var(--question-prompt-max-height, 100dvh);
|
|
font-family: var(--v2-font-family-sans);
|
|
|
|
[data-color-scheme="dark"] & [data-slot="question-option"]:not([data-picked="true"]) {
|
|
background-color: var(--v2-background-bg-layer-02);
|
|
}
|
|
|
|
[data-slot="question-body"] {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
flex: 1;
|
|
min-block-size: 0;
|
|
padding: 8px;
|
|
}
|
|
|
|
[data-slot="question-header"] {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
flex-shrink: 0;
|
|
min-inline-size: 0;
|
|
padding-inline: 4px;
|
|
}
|
|
|
|
[data-slot="question-header-top"] {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
min-block-size: 28px;
|
|
min-inline-size: 0;
|
|
}
|
|
|
|
[data-slot="question-header-title"] {
|
|
min-inline-size: 0;
|
|
font-size: 13px;
|
|
font-weight: 440;
|
|
line-height: var(--line-height-base);
|
|
color: var(--v2-text-text-muted);
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
[data-slot="question-header-actions"] {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
flex-shrink: 0;
|
|
|
|
[data-component="icon-button-v2"] {
|
|
flex-shrink: 0;
|
|
color: var(--v2-icon-icon-muted);
|
|
}
|
|
|
|
[data-slot="icon-svg"] {
|
|
flex-shrink: 0;
|
|
}
|
|
}
|
|
|
|
[data-slot="question-details"] {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
min-inline-size: 0;
|
|
}
|
|
|
|
[data-slot="question-text"] {
|
|
font-size: 13px;
|
|
font-weight: 530;
|
|
line-height: var(--line-height-base);
|
|
color: var(--v2-text-text-base);
|
|
overflow-wrap: anywhere;
|
|
-webkit-user-select: text;
|
|
user-select: text;
|
|
}
|
|
|
|
[data-slot="question-hint"] {
|
|
font-size: 11px;
|
|
font-weight: 440;
|
|
line-height: var(--line-height-tight);
|
|
color: var(--v2-text-text-faint);
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
[data-slot="question-progress"] {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 2px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
[data-slot="question-progress-segment"] {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
inline-size: 20px;
|
|
block-size: 20px;
|
|
padding: 0;
|
|
border: 0;
|
|
border-radius: 4px;
|
|
background: transparent;
|
|
cursor: pointer;
|
|
touch-action: manipulation;
|
|
|
|
&::after {
|
|
content: "";
|
|
inline-size: 14px;
|
|
block-size: 2px;
|
|
flex-shrink: 0;
|
|
background-color: var(--v2-background-bg-layer-04);
|
|
}
|
|
|
|
&[data-answered="true"]::after {
|
|
background-color: var(--v2-background-bg-accent);
|
|
}
|
|
|
|
&[data-active="true"]::after {
|
|
background-color: var(--v2-icon-icon-muted);
|
|
}
|
|
|
|
&:focus-visible {
|
|
outline: 2px solid var(--v2-border-border-focus);
|
|
outline-offset: 1px;
|
|
}
|
|
|
|
&:disabled {
|
|
cursor: not-allowed;
|
|
opacity: 0.5;
|
|
}
|
|
}
|
|
|
|
[data-slot="question-content"] {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
min-block-size: 0;
|
|
min-inline-size: 0;
|
|
}
|
|
|
|
[data-slot="question-options"] {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
flex: 1 1 auto;
|
|
min-block-size: 0;
|
|
min-inline-size: 0;
|
|
margin: 0;
|
|
padding: 0;
|
|
overflow-y: auto;
|
|
scrollbar-width: none;
|
|
|
|
&::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
[data-slot="question-option"] {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 8px;
|
|
flex-shrink: 0;
|
|
box-sizing: border-box;
|
|
inline-size: 100%;
|
|
padding: 10px;
|
|
border: 0;
|
|
border-radius: 6px;
|
|
background-color: var(--v2-background-bg-layer-01);
|
|
box-shadow: inset 0 0 0 0.5px var(--v2-border-border-base);
|
|
color: var(--v2-text-text-base);
|
|
text-align: start;
|
|
cursor: pointer;
|
|
touch-action: manipulation;
|
|
transition: background-color 150ms ease;
|
|
|
|
&[data-picked="true"] {
|
|
background-image: linear-gradient(var(--v2-question-answer-bg-selected), var(--v2-question-answer-bg-selected));
|
|
box-shadow: inset 0 0 0 0.5px var(--v2-border-border-focus);
|
|
}
|
|
|
|
&:focus-visible {
|
|
outline: 2px solid var(--v2-border-border-focus);
|
|
outline-offset: -2px;
|
|
}
|
|
|
|
&:disabled,
|
|
&[data-disabled="true"] {
|
|
cursor: not-allowed;
|
|
opacity: 0.5;
|
|
}
|
|
}
|
|
|
|
[data-slot="question-option-check"] {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
inline-size: 16px;
|
|
block-size: 20px;
|
|
flex: 0 0 16px;
|
|
}
|
|
|
|
[data-slot="question-option-box"] {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-sizing: border-box;
|
|
inline-size: 16px;
|
|
block-size: 16px;
|
|
flex: 0 0 16px;
|
|
padding: 0;
|
|
border: 0;
|
|
border-radius: 4px;
|
|
background: linear-gradient(180deg, var(--v2-alpha-light-6), var(--v2-alpha-light-0)), var(--v2-background-bg-base);
|
|
box-shadow: inset 0 0 0 0.5px var(--v2-border-border-strong);
|
|
|
|
[data-slot="icon-svg"] {
|
|
inline-size: 16px;
|
|
block-size: 16px;
|
|
flex: 0 0 16px;
|
|
opacity: 0;
|
|
color: var(--v2-icon-icon-contrast);
|
|
}
|
|
|
|
&[data-type="radio"] {
|
|
border-radius: 50%;
|
|
}
|
|
|
|
[data-slot="question-option-radio-dot"] {
|
|
inline-size: 6px;
|
|
block-size: 6px;
|
|
flex: 0 0 6px;
|
|
border-radius: 50%;
|
|
background-color: var(--v2-grey-300);
|
|
box-shadow: var(--v2-elevation-elements);
|
|
opacity: 0;
|
|
}
|
|
|
|
&[data-picked="true"] {
|
|
background:
|
|
linear-gradient(180deg, var(--v2-alpha-light-20), var(--v2-alpha-light-0)), var(--v2-background-bg-accent);
|
|
|
|
[data-slot="icon-svg"],
|
|
[data-slot="question-option-radio-dot"] {
|
|
opacity: 1;
|
|
}
|
|
|
|
&[data-type="radio"] {
|
|
box-shadow: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
[data-slot="question-option-main"] {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
min-inline-size: 0;
|
|
flex: 1;
|
|
}
|
|
|
|
[data-slot="option-label"] {
|
|
font-family: var(--v2-font-family-sans);
|
|
font-size: 13px;
|
|
font-weight: 530;
|
|
line-height: var(--line-height-base);
|
|
color: var(--v2-text-text-base);
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
[data-slot="option-description"] {
|
|
min-inline-size: 0;
|
|
font-family: var(--v2-font-family-sans);
|
|
font-size: 13px;
|
|
font-weight: 440;
|
|
line-height: var(--line-height-base);
|
|
color: var(--v2-text-text-muted);
|
|
overflow-wrap: anywhere;
|
|
white-space: normal;
|
|
}
|
|
|
|
[data-slot="question-option"][data-custom="true"] {
|
|
align-items: center;
|
|
block-size: 40px;
|
|
min-block-size: 40px;
|
|
max-block-size: 40px;
|
|
padding-block: 0;
|
|
padding-inline: 10px;
|
|
|
|
&:not([data-editing="true"]) [data-slot="text-input-v2-input"] {
|
|
font-weight: 530;
|
|
}
|
|
|
|
&[data-editing="true"] .question-custom-field[data-component="text-input-v2"] {
|
|
background:
|
|
linear-gradient(180deg, var(--v2-alpha-light-2), var(--v2-alpha-light-0)), var(--v2-background-bg-base);
|
|
box-shadow: inset 0 0 0 1px var(--v2-border-border-focus);
|
|
|
|
[data-slot="text-input-v2-input"] {
|
|
padding-inline: 8px;
|
|
|
|
&::placeholder {
|
|
color: var(--v2-text-text-faint);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
[data-slot="question-custom-toggle"] {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
inline-size: 16px;
|
|
block-size: 20px;
|
|
flex: 0 0 16px;
|
|
margin: 0;
|
|
padding: 0;
|
|
border: 0;
|
|
border-radius: 4px;
|
|
background: transparent;
|
|
cursor: pointer;
|
|
touch-action: manipulation;
|
|
|
|
&:focus-visible {
|
|
outline: 2px solid var(--v2-border-border-focus);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
&:disabled {
|
|
cursor: not-allowed;
|
|
}
|
|
}
|
|
|
|
[data-slot="question-option"] .question-custom-field[data-component="text-input-v2"] {
|
|
flex: 1;
|
|
inline-size: 100%;
|
|
min-inline-size: 0;
|
|
block-size: 28px;
|
|
align-self: center;
|
|
padding: 0;
|
|
gap: 0;
|
|
border: 0;
|
|
border-radius: 6px;
|
|
background: transparent;
|
|
box-shadow: none;
|
|
outline: none;
|
|
opacity: 1;
|
|
transition: none;
|
|
|
|
[data-slot="text-input-v2-value"] {
|
|
min-inline-size: 0;
|
|
min-block-size: 0;
|
|
gap: 0;
|
|
}
|
|
|
|
[data-slot="text-input-v2-input"] {
|
|
box-sizing: border-box;
|
|
inline-size: 100%;
|
|
min-inline-size: 0;
|
|
block-size: 28px;
|
|
margin: 0;
|
|
padding: 0;
|
|
border: 0;
|
|
background: transparent;
|
|
outline: none;
|
|
font-family: var(--v2-font-family-sans);
|
|
font-size: 13px;
|
|
font-weight: 440;
|
|
line-height: var(--line-height-compact);
|
|
color: var(--v2-text-text-base);
|
|
text-align: start;
|
|
cursor: text;
|
|
|
|
&::placeholder {
|
|
color: var(--v2-text-text-base);
|
|
opacity: 1;
|
|
}
|
|
|
|
&:disabled {
|
|
cursor: not-allowed;
|
|
}
|
|
}
|
|
}
|
|
|
|
[data-slot="question-footer"] {
|
|
display: flex;
|
|
box-sizing: border-box;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
flex-shrink: 0;
|
|
padding-block: 7px 8px;
|
|
padding-inline: 12px;
|
|
|
|
> [data-component="button-v2"][data-variant="ghost"] {
|
|
color: var(--v2-text-text-muted);
|
|
}
|
|
}
|
|
|
|
[data-slot="question-footer-actions"] {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
[data-slot="question-submit-shortcut"] {
|
|
flex-shrink: 0;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
@media (hover: hover) and (pointer: fine) {
|
|
[data-slot="question-progress-segment"]:hover:not(:disabled) {
|
|
background-color: var(--v2-overlay-simple-overlay-hover);
|
|
}
|
|
|
|
[data-slot="question-option"]:hover:not(:disabled):not([data-disabled="true"]):not([data-picked="true"]) {
|
|
background-color: var(--v2-background-bg-layer-02);
|
|
}
|
|
}
|
|
|
|
:root[data-motion="reduce"] & {
|
|
[data-slot="question-option"],
|
|
.question-custom-field[data-component="text-input-v2"] {
|
|
transition: none;
|
|
}
|
|
}
|
|
}
|