Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 113 additions & 45 deletions media/gitGraph.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
:root {
--color-1: #f0883e;
--color-2: #6a9955;
--color-3: #569cd6;
--color-4: #c586c0;
--color-5: #ce9178;
--color-6: #9cdcfe;
--color-7: #4ec9b0;
--color-8: #dcdcaa;

--col-graph-width: 50px;
--col-hash-width: 90px;
--col-author-width: 160px;
--col-date-width: 160px;
}

* {
box-sizing: border-box;
margin: 0;
Expand All @@ -11,6 +27,8 @@ body {
font-size: 13px;
height: 100vh;
overflow: hidden;
display: flex;
flex-direction: column;
}

#header {
Expand All @@ -20,6 +38,7 @@ body {
align-items: center;
gap: 8px;
background: var(--vscode-sideBarSectionHeader-background);
flex-shrink: 0;
}

#header h2 {
Expand All @@ -44,31 +63,44 @@ body {
margin-left: auto;
}

#table-container {
overflow-y: auto;
height: calc(100vh - 49px);
#column-headers {
display: flex;
align-items: center;
padding: 8px 0;
border-bottom: 2px solid var(--vscode-panel-border);
background: var(--vscode-sideBarSectionHeader-background);
flex-shrink: 0;
position: sticky;
top: 0;
z-index: 1;
}

table {
width: 100%;
border-collapse: collapse;
#column-headers .col-graph {
width: var(--col-graph-width);
flex-shrink: 0;
}

thead {
position: sticky;
top: 0;
z-index: 1;
background: var(--vscode-editor-background);
#column-headers .col-hash {
width: var(--col-hash-width);
flex-shrink: 0;
}

thead tr {
border-bottom: 2px solid var(--vscode-panel-border);
background: var(--vscode-sideBarSectionHeader-background);
#column-headers .col-message {
flex: 1;
}

th {
padding: 8px 12px;
text-align: left;
#column-headers .col-author {
width: var(--col-author-width);
flex-shrink: 0;
}

#column-headers .col-date {
width: var(--col-date-width);
flex-shrink: 0;
}

#column-headers div {
padding: 0 12px;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
Expand All @@ -83,35 +115,31 @@ th {
sans-serif;
}

th:last-child {
#column-headers div:last-child {
border-right: none;
}

tbody tr {
border-bottom: 1px solid var(--vscode-panel-border, rgba(255, 255, 255, 0.05));
cursor: pointer;
transition: background 0.1s;
}

tbody tr:nth-child(even) {
background: var(
--vscode-list-inactiveSelectionBackground,
rgba(255, 255, 255, 0.02)
);
#commits-container {
overflow-y: auto;
flex: 1;
}

tbody tr:hover {
background: var(--vscode-list-hoverBackground);
.col-hash {
width: var(--col-hash-width);
flex-shrink: 0;
padding: 8px 12px;
}

td {
.col-author {
width: var(--col-author-width);
flex-shrink: 0;
padding: 8px 12px;
vertical-align: middle;
}

.graph-cell {
width: 40px;
padding: 0 8px;
.col-date {
width: var(--col-date-width);
flex-shrink: 0;
padding: 8px 12px;
}

.hash {
Expand All @@ -121,14 +149,6 @@ td {
white-space: nowrap;
}

.message {
color: var(--vscode-editor-foreground);
max-width: 400px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.author {
color: var(--vscode-terminal-ansiGreen);
white-space: nowrap;
Expand All @@ -141,17 +161,65 @@ td {
font-size: 12px;
}

.commit-row {
display: flex;
align-items: stretch;
min-height: 40px;
}

.commit-row-alt {
background: var(
--vscode-list-inactiveSelectionBackground,
rgba(255, 255, 255, 0.02)
);
}

.commit-row:hover {
background: var(--vscode-list-hoverBackground);
}

.col-graph {
width: var(--col-graph-width);
flex: 0 0 var(--col-graph-width); /* fixed width */
padding: 0 8px;
display: flex;
align-items: stretch;
}

svg.graph {
height: 100%;
width: 100%;
display: block;
overflow: visible;
}

.col-message {
flex: 1;
padding: 8px 12px;
overflow: hidden;
display: flex;
align-items: center;
gap: 6px;
white-space: nowrap;
}

.message {
color: var(--vscode-editor-foreground);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: inline-block;
min-width: 0;
flex-shrink: 1;
}

.refs {
color: var(--vscode-terminal-ansiGreen);
font-size: 10px;
background: var(--vscode-badge-background);
padding: 2px 6px;
border-radius: 3px;
display: inline-block;
margin-left: 4px;
white-space: nowrap;
flex-shrink: 0;
}
Loading
Loading