Files
openidea/src/features/vcs/common.module.css
T
l0ng-ai 6539a95cb8 fix(vcs): keep push review readable in narrow windows (#4594)
The Push dialog's commits, changed files and diff panes had pixel minimums and fixed options rows, so narrow or short windows clipped the review and the target controls. The commits and changes now stack vertically below 640px with their own remembered split, the changed files come before the commit details, panes use relative minimums, and the target bar, options and tag options wrap.
2026-11-20 05:07:24 +08:00

698 lines
14 KiB
CSS

.form {
display: flex;
flex-direction: column;
gap: var(--space-2);
padding: 14px;
}
.fieldLabel {
color: var(--fg-secondary);
font-size: var(--fs-small);
}
.error {
color: var(--danger);
font-size: var(--fs-small);
}
.hint {
color: var(--fg-subtle);
font-size: var(--fs-small);
line-height: 1.5;
}
.cloneDirRow {
display: flex;
align-items: center;
gap: var(--space-1-5);
}
.cloneDirInput {
flex: 1;
min-width: 0;
}
.section {
padding: 10px 14px 4px;
color: var(--fg-subtle);
font-size: var(--fs-small);
}
.radioRow {
display: flex;
align-items: flex-start;
gap: var(--space-2);
padding: 4px 0;
color: var(--fg);
cursor: default;
}
.radioRow input {
margin: 2px 0 0;
accent-color: var(--accent);
}
.radioText {
display: flex;
flex-direction: column;
gap: var(--space-0-5);
}
.fileList {
max-height: 260px;
overflow: auto;
margin: 0 14px;
border: 1px solid var(--border);
border-radius: var(--radius-small);
}
.fileRow {
height: var(--h-row);
display: flex;
align-items: center;
gap: var(--space-1-5);
padding: 0 8px;
white-space: nowrap;
overflow: hidden;
}
.fileRow:hover {
background: var(--bg-hover);
}
.fileName {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
.fileDir {
color: var(--fg-subtle);
font-size: var(--fs-small);
overflow: hidden;
text-overflow: ellipsis;
}
/* Checkable changes tree in the Shelve / Create Patch dialogs. */
.fileTree {
display: flex;
height: 260px;
margin: 0 14px;
border: 1px solid var(--border);
border-radius: var(--radius-small);
}
.fileTreeView {
flex: 1;
min-width: 0;
}
.fileTreeRow {
composes: fileRow;
flex: 1;
padding: 0;
}
.grow {
flex: 1;
}
.mono {
font-family: var(--font-mono);
font-size: var(--fs-small);
}
.commitRow {
height: var(--h-row);
display: flex;
align-items: center;
gap: var(--space-2);
padding: 0 8px;
white-space: nowrap;
}
.commitHash {
flex-shrink: 0;
color: var(--fg-subtle);
font-family: var(--font-mono);
font-size: var(--fs-small);
}
.commitSubject {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
color: var(--fg);
}
.commitMeta {
flex-shrink: 0;
color: var(--fg-subtle);
font-size: var(--fs-small);
}
.empty {
padding: 12px;
color: var(--fg-faint);
text-align: center;
}
.commitListBody {
flex: 1;
min-height: 320px;
display: flex;
flex-direction: column;
}
.boxList {
flex: 1;
border: 1px solid var(--border);
border-radius: var(--radius-small);
}
/* Push and commit list dialogs: the list fills the body so a resizable window shows more rows. */
.pushDialog > [data-dialog-body],
.listDialog > [data-dialog-body] {
display: flex;
flex-direction: column;
}
.pushOptions,
.pushTagOptions {
display: flex;
align-items: center;
gap: var(--space-2);
}
.pushOptions {
flex-wrap: wrap;
max-width: 100%;
font-size: var(--fs-ui);
}
.pushTargetBar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--space-1) var(--space-2);
padding: var(--space-2) var(--space-3) 0;
}
.pushTargetSource {
max-width: 100%;
overflow-wrap: anywhere;
color: var(--fg-secondary);
}
.pushTargetControls {
display: flex;
align-items: center;
flex: 1 1 240px;
min-width: 0;
gap: var(--space-1);
}
.pushTargetControls .targetInput {
flex: 0 1 330px;
min-width: 8ch;
width: auto;
margin: 0;
}
.pushTreeWrap {
flex: 1;
min-height: 220px;
display: flex;
flex-direction: column;
padding: var(--space-2) var(--space-3) var(--space-3);
}
.pushListWrap {
flex: 1;
min-height: 180px;
display: flex;
flex-direction: column;
padding: var(--space-2) var(--space-3) var(--space-3);
}
.pushSplit {
flex: 1 1 min(450px, 65vh);
min-height: 0;
}
/* The panel's own `height: 100%` doesn't resolve against a flex-basis height in WebKit: stretch instead. */
.pushSplit .pushSplitPanel {
height: auto;
align-self: stretch;
}
.pushSides {
flex: 1;
min-height: 0;
}
.pushDiff {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
padding: 8px 14px 14px;
}
.pushDiffHeader {
display: flex;
align-items: center;
gap: var(--space-2);
min-height: 24px;
padding-bottom: 6px;
color: var(--fg-subtle);
}
.pushDiffPath {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.pushDiffBody {
flex: 1;
min-height: 0;
overflow: hidden;
border: 1px solid var(--border);
}
.pushSplitPanel > .pushListWrap,
.pushSplitPanel > .pushTreeWrap {
min-height: 0;
}
.pushRepoRow[data-idle],
.pushRepoRow[data-idle] label {
color: var(--fg-subtle);
}
.pushChanges {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
padding-top: var(--space-2);
}
.pushChanges .comparison {
flex: 1;
height: auto;
min-height: 0;
padding: 0 var(--space-3) var(--space-2);
}
.pushChangesTitle {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--space-2);
min-height: var(--h-control);
padding: 0 var(--space-3) var(--space-1);
color: var(--fg-subtle);
font-size: var(--fs-small);
}
.pushGrouping {
margin-left: auto;
}
.pushDetailsSplit {
flex: 1;
min-height: 0;
}
.pushDetailsSplit .pushDetailsPanel {
height: auto;
}
.pushCommitDetails {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
gap: var(--space-1);
margin: var(--space-1) var(--space-3);
padding: var(--space-1) var(--space-2);
overflow: auto;
border: 1px solid var(--border);
border-radius: var(--radius-small);
-webkit-user-select: text;
user-select: text;
}
.pushCommitMessage {
color: var(--fg-strong);
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.todoList {
margin: 8px 0 0;
padding-left: 18px;
white-space: normal;
}
.linkButton {
padding: 0;
border: none;
background: none;
color: var(--link);
font: inherit;
cursor: pointer;
}
.linkButton:hover {
color: var(--link-hover);
text-decoration: underline;
}
/* Operation in progress (rebase, merge…) above the Commit tool window's changes. */
.banner {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--space-0-5) 10px;
min-height: 28px;
padding: 4px 10px;
border-bottom: 1px solid var(--border);
background: var(--bg-banner-warning, color-mix(in srgb, var(--warning) 12%, transparent));
color: var(--fg);
font-size: var(--fs-small);
}
.bannerText {
flex: 1 0 auto;
max-width: calc(100% - 24px);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.linkButton:disabled {
color: var(--fg-faint);
cursor: default;
text-decoration: none;
}
.textarea {
resize: vertical;
min-height: 48px;
padding: 4px 8px;
border: 1px solid var(--border-input, var(--border));
border-radius: var(--radius-small);
background: var(--bg-input);
color: var(--fg);
font: inherit;
}
.textarea:focus {
outline: none;
border-color: var(--focus-ring);
}
/* Interactive rebase dialog. */
.rebaseList {
max-height: 360px;
overflow: auto;
margin: 0 14px;
border: 1px solid var(--border);
border-radius: var(--radius-small);
}
.rebaseRow {
min-height: var(--h-row);
display: flex;
align-items: center;
gap: var(--space-2);
padding: 2px 6px;
white-space: nowrap;
}
.rebaseRow:hover {
background: var(--bg-hover);
}
.rebaseAction {
width: 120px;
flex: none;
}
.rebaseMessage {
flex: 1;
min-width: 0;
min-height: 0;
}
/* Push dialog: the editable target branch. */
.targetInput {
width: 220px;
margin-left: 6px;
}
.targetPopup {
/* What a list row (ui/List.module.css) adds around its name: the inset from the popup edge
plus row padding, then the icon and the gap after it. */
--target-row-inset: calc(6px + 8px);
--target-row-leading: calc(14px + 6px);
min-width: 260px;
display: flex;
flex-direction: column;
overflow: hidden;
}
/* Rows are out of flow inside the virtual list: this hidden column gives the popup their width. */
.targetSizer {
width: max-content;
/* As wide as the longest branch name, up to a cap (Popup limits it to the window). */
max-width: min(640px, 70vw);
box-sizing: border-box;
height: 0;
padding-inline: var(--target-row-inset);
overflow: hidden;
visibility: hidden;
pointer-events: none;
display: flex;
flex-direction: column;
}
/* Stands in for the row's branch icon, so a name is measured with the row around it. */
.targetSizer > span {
padding-left: var(--target-row-leading);
white-space: nowrap;
}
.targetListWrap {
display: flex;
flex-direction: column;
min-height: 0;
padding: 4px 0;
box-sizing: content-box;
}
.targetList {
flex: 1;
}
.prefixPopup {
padding-block: var(--space-1);
}
.prefixList {
height: 100%;
}
.targetRow {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
gap: var(--space-1-5);
}
.targetIcon {
flex: none;
color: var(--fg-subtle);
}
.targetName {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Fits the remote and target fields into a 22px tree row. */
.pushRepoRow {
display: flex;
align-items: center;
gap: var(--space-1);
flex: 1;
min-width: 0;
}
.pushRepoName {
min-width: 20px;
}
.pushRepoLabel,
.pushSourceBranch,
.pushRemoteName {
display: block;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.pushSourceBranch,
.pushRemoteName {
color: var(--fg-subtle);
font-size: var(--fs-small);
}
.pushRemoteName {
flex: none;
max-width: 14ch;
}
.pushRowTarget {
--h-field: var(--h-control-small);
--h-control: var(--h-control-small);
display: inline-flex;
align-items: center;
gap: var(--space-0-5);
min-width: 10ch;
font-size: var(--fs-small);
}
.pushTargetControls > button,
.pushRowTarget > button {
min-width: 0;
max-width: 18ch;
font-size: var(--fs-small);
}
.pushRowSeparator {
flex: none;
color: var(--fg-faint);
}
.pushRowInput {
min-width: 7ch;
font-size: var(--fs-small);
}
.pushRowInput[data-changed]:not(:focus-visible) {
box-shadow: inset 0 0 0 1px var(--accent);
}
.choiceList {
max-height: 240px;
overflow: auto;
border: 1px solid var(--border);
border-radius: var(--radius-small);
}
/* Pull / Merge / Rebase dialogs. */
.fieldRow {
display: flex;
align-items: center;
gap: var(--space-1-5);
min-width: 0;
}
.optionGrid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: var(--space-1) var(--space-3);
}
/* Manage Remotes / Worktrees lists. */
.manageBar {
display: flex;
align-items: center;
gap: var(--space-0-5);
}
.manageRow {
width: 100%;
height: var(--h-row);
display: flex;
align-items: center;
gap: 10px;
padding: 0 8px;
border: none;
background: none;
color: var(--fg);
font: inherit;
text-align: left;
white-space: nowrap;
overflow: hidden;
cursor: default;
}
.manageRow:hover {
background: var(--bg-hover);
}
.manageRowSelected,
.manageRowSelected:hover {
background: var(--bg-list-selected);
}
/* Worktrees dialog: the tree needs a height of its own inside the auto-sized body. */
.worktreeListDialog {
height: 340px;
min-height: 0;
}
/* Worktrees tree rows: the worktree name keeps its width, the path is what gets cut short. */
.worktreeIcon {
flex: none;
margin-right: 2px;
color: var(--fg-muted);
}
.worktreeLabel {
flex: none;
max-width: 45%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.worktreeDetail {
min-width: 0;
margin-left: 4px;
overflow: hidden;
text-overflow: ellipsis;
color: var(--fg-muted);
}
.comparisonDialog > [data-dialog-body] {
display: flex;
flex-direction: column;
}
.comparisonDialog .comparison {
flex: 1 1 auto;
}
.comparisonWindow {
display: flex;
flex-direction: column;
height: 100%;
min-height: 0;
background: var(--bg-dialog, var(--bg-elev));
color: var(--fg);
}
/* Linux: frameless X11 windows have no shadow, so mark the edge in CSS (like the Settings window). */
.comparisonWindowEdge {
position: relative;
}
.comparisonWindowEdge::after {
content: "";
position: absolute;
inset: 0;
z-index: 1;
pointer-events: none;
box-shadow: inset 0 0 0 1px var(--border-window);
}
.comparisonWindowLoading {
display: flex;
flex: 1;
align-items: center;
justify-content: center;
gap: var(--space-2);
color: var(--fg-muted);
}
.comparisonWindowBody {
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
overflow: hidden;
}
.comparisonWindowBody[hidden] {
display: none;
}
.comparisonWindowBody > .comparisonWindow {
flex: 1;
}
.comparisonWindowBody > .comparison {
flex: 1 1 auto;
}
.comparisonWindowFooter {
display: flex;
justify-content: flex-end;
flex: none;
gap: var(--space-3);
padding: 12px 16px;
}
.comparison {
display: flex;
height: min(520px, 65vh);
min-height: 180px;
padding: 0 12px 12px;
gap: 10px;
}
.comparisonTree {
flex: 1;
min-width: 0;
border: 1px solid var(--border);
}
.comparisonWithDiff .comparisonTree {
flex: 0 0 30%;
}
.comparisonDiff {
flex: 1;
min-width: 0;
min-height: 0;
overflow: hidden;
border: 1px solid var(--border);
}
.compareNotice {
padding: 6px 14px;
color: var(--fg-subtle);
overflow-wrap: anywhere;
}
.compareToolbar {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--space-2);
padding: 6px 14px;
}
.compareToolbar > input {
flex: 1;
min-width: 140px;
}
.compareAdded {
color: var(--vcs-added);
font-variant-numeric: tabular-nums;
}
.compareRemoved {
color: var(--vcs-deleted);
font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
.comparisonWithDiff {
flex-direction: column;
height: 65vh;
}
.comparisonWithDiff .comparisonTree {
flex: 0 0 30%;
min-height: 90px;
}
}