detached 0d107f6

fix(gui): scope homepage css styles to prevent global conflicts

commit
0d107f6202f5e2866621680cee616b9a8a5b3b3a
author
bamen · · 2025-09-14 20:43 UTC
committer
bamen · · 2025-09-14 21:55 UTC
parent
6a89a4c
signature
unsigned
1 file · +16 -10
M gui/src/pages/Homepage.svelte +16 -10
@@ -139,6 +139,7 @@
139139 const loading = $derived(historyLoading || shortcutsLoading);
140140 </script>
141141
142+<div class="homepage-container">
142143 <div class="container">
143144 <div class="history-section">
144145 <h2 class="section-title">Recent History</h2>
@@ -198,23 +199,28 @@
198199 </div>
199200 </div>
200201 </div>
202+</div>
201203
202204 <style>
203- /* Global styles - using CSS to match the original design */
204- :global(*) {
205- margin: 0;
206- padding: 0;
207- box-sizing: border-box;
208- }
209-
210- :global(body) {
205+ /* Scoped homepage container to prevent global CSS conflicts */
206+ .homepage-container {
211207 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
212208 background: #1a1a1a;
213209 color: #ffffff;
214- height: 100vh;
210+ min-height: 100vh;
211+ overflow-x: hidden;
215212 display: flex;
216213 flex-direction: column;
217- overflow-x: hidden;
214+ margin: 0;
215+ padding: 0;
216+ box-sizing: border-box;
217+ }
218+
219+ /* Reset styles for children, but scoped to homepage only */
220+ .homepage-container * {
221+ margin: 0;
222+ padding: 0;
223+ box-sizing: border-box;
218224 }
219225
220226 .container {
@@ -139,6 +139,7 @@
139 const loading = $derived(historyLoading || shortcutsLoading);139 const loading = $derived(historyLoading || shortcutsLoading);
140 </script>140 </script>
141 141
142+<div class="homepage-container">
142 <div class="container">143 <div class="container">
143 <div class="history-section">144 <div class="history-section">
144 <h2 class="section-title">Recent History</h2>145 <h2 class="section-title">Recent History</h2>
@@ -198,23 +199,28 @@
198 </div>199 </div>
199 </div>200 </div>
200 </div>201 </div>
202+</div>
201 203
202 <style>204 <style>
203- /* Global styles - using CSS to match the original design */205+ /* Scoped homepage container to prevent global CSS conflicts */
204- :global(*) {206+ .homepage-container {
205- margin: 0;
206- padding: 0;
207- box-sizing: border-box;
208- }
209-
210- :global(body) {
211 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;207 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
212 background: #1a1a1a;208 background: #1a1a1a;
213 color: #ffffff;209 color: #ffffff;
214- height: 100vh;210+ min-height: 100vh;
211+ overflow-x: hidden;
215 display: flex;212 display: flex;
216 flex-direction: column;213 flex-direction: column;
217- overflow-x: hidden;214+ margin: 0;
215+ padding: 0;
216+ box-sizing: border-box;
217+ }
218+
219+ /* Reset styles for children, but scoped to homepage only */
220+ .homepage-container * {
221+ margin: 0;
222+ padding: 0;
223+ box-sizing: border-box;
218 }224 }
219 225
220 .container {226 .container {

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