Files
openidea/src/features/vcs/common.module.css
T
l0ng-ai 330d45279b Align the Git Remotes table and edit form (#4724)
Git Remotes uses dedicated Name and URL columns with a fixed header; long values keep their own space and show in full on hover. The list scrolls inside a resizable dialog with the toolbar and footer in view, keyboard selection brings the row into view, and the edit form aligns both labels beside their fields.
2026-11-20 15:39:03 +08:00

835 lines
16 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);
}
.updateForm {
min-width: 0;
gap: var(--space-3);
padding: var(--space-4);
font-size: var(--fs-ui);
overflow-wrap: anywhere;
}
.updateOptions {
display: flex;
flex-direction: column;
gap: var(--space-2);
min-inline-size: 0;
margin: 0;
padding: var(--space-2) 0 0;
border: 0;
border-top: 1px solid var(--border-popup);
}
.updateOptions > legend {
padding: 0 var(--space-2) 0 0;
color: var(--fg-strong);
font-weight: 600;
}
.updateOptions .updateRadio {
align-items: flex-start;
}
.updateCommand {
color: var(--fg-subtle);
font-family: var(--font-mono);
font-size: var(--fs-small);
}
.updateActions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--space-2) var(--space-3);
min-width: 0;
}
.updateActions .updateReset {
max-width: 100%;
min-height: var(--h-button);
height: auto;
padding-block: var(--space-1);
line-height: 1.3;
white-space: normal;
}
.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);
}
.stashForm {
gap: var(--space-3);
padding: var(--space-4);
font-size: var(--fs-ui);
}
.stashRepo {
display: flex;
align-items: center;
gap: var(--space-2);
color: var(--fg-secondary);
}
.stashRepo > button {
flex: 1;
}
.stashBranch {
color: var(--fg-secondary);
line-height: 1.5;
overflow-wrap: anywhere;
}
.stashMessage {
display: flex;
flex-direction: column;
gap: var(--space-1-5);
}
.stashMessage > label {
color: var(--fg-strong);
font-weight: 600;
}
.stashMessage > textarea {
min-width: 0;
padding: var(--space-2);
line-height: 1.5;
}
.stashOptions {
display: flex;
flex-wrap: wrap;
gap: var(--space-2) var(--space-4);
}
/* Interactive rebase dialog. */
.rebaseDialog {
height: min(550px, calc(100vh - 48px));
}
.rebasePage {
display: flex;
flex-direction: column;
gap: var(--space-2);
min-height: 0;
height: 100%;
padding: var(--space-2) var(--space-3) var(--space-3);
}
.rebaseSplit {
flex: 1;
border: 1px solid var(--border);
border-radius: var(--radius-small);
}
.rebaseToolbar {
display: flex;
flex: none;
align-items: center;
flex-wrap: wrap;
gap: var(--space-1);
padding: var(--space-1) var(--space-2);
border-bottom: 1px solid var(--border);
}
.rebaseList {
flex: 1;
min-height: 0;
overflow: auto;
padding: var(--space-1);
}
.rebaseRow {
display: flex;
align-items: center;
gap: var(--space-1);
padding: var(--space-0-5) var(--space-2);
border-radius: var(--radius-selection);
}
.rebaseRow:hover {
background: var(--bg-hover);
}
.rebaseRow[data-selected] {
background: var(--bg-selected);
}
.rebaseCommit {
display: flex;
flex: 1;
flex-direction: column;
justify-content: center;
gap: var(--space-0-5);
min-width: 0;
min-height: var(--h-row);
padding: var(--space-1) 0;
border-radius: var(--radius-small);
color: var(--fg-strong);
text-align: left;
}
.rebaseCommit:focus-visible {
outline: 1px solid var(--focus-ring);
}
.rebaseSubject {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.rebaseSubject[data-dropped] {
text-decoration: line-through;
}
.rebaseAction {
width: 112px;
flex: 0 1 112px;
}
.rebaseDetails {
display: flex;
flex: 1;
flex-direction: column;
gap: var(--space-2);
min-width: 0;
min-height: 0;
overflow: auto;
padding: var(--space-3);
}
.rebaseMetadata {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--space-0-5) var(--space-2);
color: var(--fg-subtle);
font-size: var(--fs-small);
overflow-wrap: anywhere;
}
.rebasePreview {
color: var(--fg-strong);
line-height: 1.5;
white-space: pre-wrap;
overflow-wrap: anywhere;
user-select: text;
}
.rebaseMessage {
flex: 1;
width: 100%;
min-height: calc(4 * var(--h-row));
resize: none;
line-height: 1.5;
}
/* 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);
}
.manageBar {
display: flex;
align-items: center;
gap: var(--space-0-5);
}
/* 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;
}
}