дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-05 17:47:08 +02:00
At the minimum window size the Find/Replace in Files header was a single non-wrapping flex row with a fixed-width mask input, so the title and count wrapped and Search Context / Pin Window were clipped by the popup. Below the popup's own minimum width (a container query) the mask and buttons move to a second row; the title and count stay on one line and end in an ellipsis. An e2e test checks every search popup's header controls at 400 × 500. Co-authored-by: wildcatDownstairs <[email protected]>
299 рядки
5.6 KiB
CSS
299 рядки
5.6 KiB
CSS
/* IDEA's Find in Files is a popup: Popup.background, not the dialog surface. */
|
|
.dialog {
|
|
container-type: inline-size;
|
|
max-height: calc(90vh - 12px);
|
|
background: var(--bg-popup, var(--bg-elev));
|
|
font-family: var(--font-ui);
|
|
}
|
|
.dialog > :global([data-dialog-body]) {
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
.root {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 0;
|
|
}
|
|
.header {
|
|
flex: none;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
height: 42px;
|
|
padding: 0 14px 0 20px;
|
|
border-bottom: 1px solid var(--border-popup);
|
|
color: var(--fg-subtle);
|
|
}
|
|
/* Title and count give way to the controls: they end in an ellipsis instead of wrapping. */
|
|
.title,
|
|
.count {
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
.title {
|
|
color: var(--fg-strong);
|
|
font-weight: 600;
|
|
}
|
|
.status {
|
|
min-width: 0;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-1-5);
|
|
color: var(--fg-faint);
|
|
font-size: var(--fs-small);
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
.spacer {
|
|
flex: 1;
|
|
}
|
|
/* The mask and the buttons; their own row once the popup is too narrow for one (as in Search Everywhere). */
|
|
.tools {
|
|
display: contents;
|
|
}
|
|
.maskToggle {
|
|
flex: none;
|
|
white-space: nowrap;
|
|
}
|
|
.mask {
|
|
min-width: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
height: var(--h-control);
|
|
background: var(--bg-field);
|
|
border: 1px solid var(--border-strong);
|
|
border-radius: var(--radius-small);
|
|
padding-left: 6px;
|
|
}
|
|
.maskOff {
|
|
opacity: 0.6;
|
|
}
|
|
.maskInput {
|
|
width: 120px;
|
|
min-width: 0;
|
|
background: none;
|
|
border: 0;
|
|
outline: none;
|
|
color: var(--fg);
|
|
}
|
|
.fields {
|
|
flex: none;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-2);
|
|
padding: 8px 8px 0;
|
|
}
|
|
/* The query fields sit on the popup surface, framed only by their border. */
|
|
.fields .field {
|
|
width: 100%;
|
|
background: transparent;
|
|
}
|
|
.field input {
|
|
font-family: var(--font-mono);
|
|
font-size: var(--fs-code);
|
|
}
|
|
.error {
|
|
color: var(--danger);
|
|
font-size: var(--fs-small);
|
|
padding-left: 2px;
|
|
}
|
|
/* Scope tabs line up with the title; the selected one is a neutral pressed pill, as in IDEA. */
|
|
.scopeRow {
|
|
--bg-tab-selected: var(--bg-toolbar-pressed);
|
|
--border-tab-selected: transparent;
|
|
flex: none;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-3);
|
|
padding: 8px 14px 4px 20px;
|
|
}
|
|
.scopeDetail {
|
|
flex: 1;
|
|
min-width: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
gap: var(--space-1);
|
|
}
|
|
.dirInput {
|
|
width: 100%;
|
|
max-width: 420px;
|
|
height: var(--h-control-small);
|
|
padding: 0 6px;
|
|
background: var(--bg-input);
|
|
border: 1px solid var(--border-strong);
|
|
border-radius: var(--radius-small);
|
|
outline: none;
|
|
color: var(--fg);
|
|
font-family: var(--font-mono);
|
|
font-size: var(--fs-small);
|
|
}
|
|
.dirInput:focus {
|
|
border-color: var(--accent);
|
|
}
|
|
/* Results alone (empty state) or results over the preview; grows with the popup. */
|
|
.split {
|
|
flex: 1 1 auto;
|
|
height: 500px;
|
|
min-height: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
.split > * {
|
|
flex: 1;
|
|
min-height: 0;
|
|
}
|
|
.results {
|
|
flex: 1;
|
|
min-height: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: 2px 0;
|
|
}
|
|
.results > * {
|
|
flex: 1;
|
|
}
|
|
.outdated .rowText,
|
|
.outdated .rowText *,
|
|
.outdated .rowFile,
|
|
.outdated .rowFile * {
|
|
color: var(--fg-faint);
|
|
}
|
|
.rowText {
|
|
flex: 1;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
font-family: var(--font-mono);
|
|
font-weight: var(--fw-code);
|
|
}
|
|
.rowFile {
|
|
flex: none;
|
|
max-width: 40%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
color: var(--fg-subtle);
|
|
}
|
|
.rowFileActive {
|
|
color: var(--fg-muted);
|
|
}
|
|
.rowLine {
|
|
color: var(--fg-faint);
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
.previewHeader {
|
|
flex: none;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 10px;
|
|
height: 36px;
|
|
padding: 0 20px;
|
|
border-top: 1px solid var(--border-popup);
|
|
color: var(--fg-subtle);
|
|
}
|
|
.previewPath {
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
.previewName {
|
|
color: var(--fg-strong);
|
|
margin-right: 8px;
|
|
}
|
|
.previewBox {
|
|
flex: 1;
|
|
min-height: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
.footer {
|
|
flex: none;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
gap: var(--space-2);
|
|
min-height: 46px;
|
|
padding: 8px 20px;
|
|
}
|
|
.footer > button,
|
|
.footer > label {
|
|
flex: none;
|
|
white-space: nowrap;
|
|
}
|
|
.hint {
|
|
flex: 1 1 0;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
color: var(--fg-faint);
|
|
font-size: var(--fs-small);
|
|
}
|
|
.rowDone {
|
|
opacity: 0.55;
|
|
}
|
|
.rowExcluded {
|
|
opacity: 0.55;
|
|
text-decoration: line-through;
|
|
}
|
|
.empty {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: var(--space-0-5);
|
|
padding: 0 20px;
|
|
text-align: center;
|
|
line-height: 1.6;
|
|
}
|
|
.emptyOptions {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
margin-top: 1.2em;
|
|
}
|
|
.link {
|
|
padding: 0;
|
|
border: 0;
|
|
background: none;
|
|
color: var(--link);
|
|
font: inherit;
|
|
cursor: pointer;
|
|
}
|
|
.link:hover {
|
|
color: var(--link-hover);
|
|
}
|
|
/* IDEA's disabled "Ctrl+Enter" label before Open in Find Window. */
|
|
.okHint {
|
|
flex: none;
|
|
color: var(--fg-faint);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* Narrower than the popup's own minimum width happens only when the window is smaller. */
|
|
@container (max-width: 559px) {
|
|
.header {
|
|
flex-wrap: wrap;
|
|
row-gap: var(--space-1-5);
|
|
height: auto;
|
|
padding-block: 6px;
|
|
}
|
|
.spacer {
|
|
display: none;
|
|
}
|
|
.tools {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-2);
|
|
width: 100%;
|
|
}
|
|
.mask {
|
|
margin-right: auto;
|
|
}
|
|
}
|