detached a015def

fix(theme): scale remaining fixed CSS dimensions (#440)

* fix(theme): scale auxiliary CSS dimensions

* fix(theme): preserve baseline CSS dimensions
commit
a015def7b20f22b5e05faaa83f351730c4969801
author
bnema · · 2026-09-15 04:53 UTC
committer
GitHub · · 2026-09-15 04:53 UTC
parent
fc90745
signature
GPG UnverifiedB5690EEEBB952194 The key is unknown
2 files · +36 -16
M internal/ui/theme/css.go +16 -16
@@ -874,22 +874,22 @@ func generatePaneCSS(p Palette) string {
874874 }
875875
876876 .loading-skeleton-spinner {
877- -gtk-icon-size: 32px;
878- min-width: 32px;
879- min-height: 32px;
877+ -gtk-icon-size: 2.1818em;
878+ min-width: 2.1818em;
879+ min-height: 2.1818em;
880880 color: var(--muted);
881881 opacity: 0.4;
882882 }
883883
884884 .loading-skeleton-logo {
885885 opacity: 0.08;
886- min-width: 256px;
887- min-height: 256px;
886+ min-width: 17.4545em;
887+ min-height: 17.4545em;
888888 }
889889
890890 .loading-skeleton-version {
891891 opacity: 0.25;
892- font-size: 13px;
892+ font-size: 0.8864em;
893893 color: var(--muted);
894894 }
895895
@@ -979,11 +979,11 @@ func generateStackedPaneCSS(p Palette) string {
979979 .stacked-pane-close-button {
980980 background: transparent;
981981 border: none;
982- border-radius: 4px;
983- padding: 4px;
984- margin: 0 2px;
985- min-width: 20px;
986- min-height: 20px;
982+ border-radius: 0.2727em;
983+ padding: 0.2727em;
984+ margin: 0 0.1364em;
985+ min-width: 1.3636em;
986+ min-height: 1.3636em;
987987 opacity: 0.4;
988988 transition: opacity 100ms ease-in-out, background-color 100ms ease-in-out;
989989 }
@@ -1020,20 +1020,20 @@ func generateProgressBarCSS(p Palette) string {
10201020
10211021 /* Native GtkProgressBar with osd class */
10221022 progressbar.osd {
1023- min-height: 4px;
1023+ min-height: 0.2727em;
10241024 }
10251025
10261026 progressbar.osd trough {
1027- min-height: 4px;
1028- min-width: 2px;
1027+ min-height: 0.2727em;
1028+ min-width: 0.1364em;
10291029 margin: 0;
10301030 padding: 0;
10311031 background-color: alpha(var(--bg), 0.3);
10321032 }
10331033
10341034 progressbar.osd progress {
1035- min-height: 4px;
1036- min-width: 2px;
1035+ min-height: 0.2727em;
1036+ min-width: 0.1364em;
10371037 margin: 0;
10381038 padding: 0;
10391039 background-color: var(--accent);
@@ -874,22 +874,22 @@ func generatePaneCSS(p Palette) string {
874 }874 }
875 875
876 .loading-skeleton-spinner {876 .loading-skeleton-spinner {
877- -gtk-icon-size: 32px;877+ -gtk-icon-size: 2.1818em;
878- min-width: 32px;878+ min-width: 2.1818em;
879- min-height: 32px;879+ min-height: 2.1818em;
880 color: var(--muted);880 color: var(--muted);
881 opacity: 0.4;881 opacity: 0.4;
882 }882 }
883 883
884 .loading-skeleton-logo {884 .loading-skeleton-logo {
885 opacity: 0.08;885 opacity: 0.08;
886- min-width: 256px;886+ min-width: 17.4545em;
887- min-height: 256px;887+ min-height: 17.4545em;
888 }888 }
889 889
890 .loading-skeleton-version {890 .loading-skeleton-version {
891 opacity: 0.25;891 opacity: 0.25;
892- font-size: 13px;892+ font-size: 0.8864em;
893 color: var(--muted);893 color: var(--muted);
894 }894 }
895 895
@@ -979,11 +979,11 @@ func generateStackedPaneCSS(p Palette) string {
979 .stacked-pane-close-button {979 .stacked-pane-close-button {
980 background: transparent;980 background: transparent;
981 border: none;981 border: none;
982- border-radius: 4px;982+ border-radius: 0.2727em;
983- padding: 4px;983+ padding: 0.2727em;
984- margin: 0 2px;984+ margin: 0 0.1364em;
985- min-width: 20px;985+ min-width: 1.3636em;
986- min-height: 20px;986+ min-height: 1.3636em;
987 opacity: 0.4;987 opacity: 0.4;
988 transition: opacity 100ms ease-in-out, background-color 100ms ease-in-out;988 transition: opacity 100ms ease-in-out, background-color 100ms ease-in-out;
989 }989 }
@@ -1020,20 +1020,20 @@ func generateProgressBarCSS(p Palette) string {
1020 1020
1021 /* Native GtkProgressBar with osd class */1021 /* Native GtkProgressBar with osd class */
1022 progressbar.osd {1022 progressbar.osd {
1023- min-height: 4px;1023+ min-height: 0.2727em;
1024 }1024 }
1025 1025
1026 progressbar.osd trough {1026 progressbar.osd trough {
1027- min-height: 4px;1027+ min-height: 0.2727em;
1028- min-width: 2px;1028+ min-width: 0.1364em;
1029 margin: 0;1029 margin: 0;
1030 padding: 0;1030 padding: 0;
1031 background-color: alpha(var(--bg), 0.3);1031 background-color: alpha(var(--bg), 0.3);
1032 }1032 }
1033 1033
1034 progressbar.osd progress {1034 progressbar.osd progress {
1035- min-height: 4px;1035+ min-height: 0.2727em;
1036- min-width: 2px;1036+ min-width: 0.1364em;
1037 margin: 0;1037 margin: 0;
1038 padding: 0;1038 padding: 0;
1039 background-color: var(--accent);1039 background-color: var(--accent);
M internal/ui/theme/css_test.go +20 -0
@@ -252,6 +252,26 @@ func TestGenerateCSSWithScale_UsesMediumWeightForOmniboxSuggestionTitle(t *testi
252252 assert.NotContains(t, css, ".omnibox-suggestion-title {\n\tfont-size: 0.875em;\n\tcolor: var(--text);\n\tfont-weight: 400;")
253253 }
254254
255+func TestGenerateCSS_AuxiliaryWidgetDimensionsUseScalableUnits(t *testing.T) {
256+ css := GenerateCSS(DefaultDarkPalette())
257+
258+ selectors := []string{
259+ ".loading-skeleton-spinner",
260+ ".loading-skeleton-logo",
261+ ".loading-skeleton-version",
262+ ".stacked-pane-close-button",
263+ "progressbar.osd",
264+ "progressbar.osd trough",
265+ "progressbar.osd progress",
266+ }
267+ pxDimension := regexp.MustCompile(`(?m)^\s*(?:-gtk-icon-size|font-size|min-width|min-height|padding|margin|border-radius):[^;]*\dpx`)
268+ for _, selector := range selectors {
269+ block := cssRuleBlock(t, css, selector)
270+ assert.NotRegexp(t, pxDimension, block, selector)
271+ assert.Regexp(t, `\d(?:\.\d+)?em`, block, selector)
272+ }
273+}
274+
255275 func TestGenerateCSS_OmniboxOuterBordersUseScalableEmUnits(t *testing.T) {
256276 css := GenerateCSS(DefaultDarkPalette())
257277
@@ -252,6 +252,26 @@ func TestGenerateCSSWithScale_UsesMediumWeightForOmniboxSuggestionTitle(t *testi
252 assert.NotContains(t, css, ".omnibox-suggestion-title {\n\tfont-size: 0.875em;\n\tcolor: var(--text);\n\tfont-weight: 400;")252 assert.NotContains(t, css, ".omnibox-suggestion-title {\n\tfont-size: 0.875em;\n\tcolor: var(--text);\n\tfont-weight: 400;")
253 }253 }
254 254
255+func TestGenerateCSS_AuxiliaryWidgetDimensionsUseScalableUnits(t *testing.T) {
256+ css := GenerateCSS(DefaultDarkPalette())
257+
258+ selectors := []string{
259+ ".loading-skeleton-spinner",
260+ ".loading-skeleton-logo",
261+ ".loading-skeleton-version",
262+ ".stacked-pane-close-button",
263+ "progressbar.osd",
264+ "progressbar.osd trough",
265+ "progressbar.osd progress",
266+ }
267+ pxDimension := regexp.MustCompile(`(?m)^\s*(?:-gtk-icon-size|font-size|min-width|min-height|padding|margin|border-radius):[^;]*\dpx`)
268+ for _, selector := range selectors {
269+ block := cssRuleBlock(t, css, selector)
270+ assert.NotRegexp(t, pxDimension, block, selector)
271+ assert.Regexp(t, `\d(?:\.\d+)?em`, block, selector)
272+ }
273+}
274+
255 func TestGenerateCSS_OmniboxOuterBordersUseScalableEmUnits(t *testing.T) {275 func TestGenerateCSS_OmniboxOuterBordersUseScalableEmUnits(t *testing.T) {
256 css := GenerateCSS(DefaultDarkPalette())276 css := GenerateCSS(DefaultDarkPalette())
257 277

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close