Repository navigation
web: add a frosted glass look with a toggle - #8647
Merged
Merged
Conversation
unknwon
added a commit
that referenced
this pull request
Nov 17, 2026
The glass look is on by default and scoped under the glass-ui class on <html>, so turning it off restores the plain look unchanged. Components opt in with the glass, glass-list, glass-bar and glass-control marker classes, and the glass-ui variant for layout that only glass needs.
Headings that label a single box, e.g., Activities on the dashboard, floated alone on the glass backdrop. A glass-section turns the section into one panel with the heading as its header row.
The glass fill of outline buttons outranked their hover:bg utility and replaced it with a fill as faint as their rest state, so hovering showed nothing in dark mode. Glass controls now brighten their fill and edge.
Glass is now off unless turned on in the settings menu. With glass off, dialogs, sheets and popovers no longer blur or lighten their background, and the branches and commits sections keep their square corners.
White on #ff6762 is 2.85:1. #0a0a0a on it is 6.95:1, matching how the dark primary button pairs dark text with its light fill.
…lass look Buttons and links styled by hand, e.g., Browse files, commit SHA links and Diff settings, and the issue filter dropdowns now take glass-control. The repository, issue, organization, profile, dashboard issues and wiki sidebars and wiki pages sit on glass panels.
Profile tabs become the header row of the repository and activity panel, dividers inside glass button groups use the glass edge, and sidebars sit closer to the content beside them.
With glass on, team members, followers and the commits of a new pull request become sections with header rows, standalone forms become panels, the code view's file tree pane gets a frosted fill, nested panels flatten, and columns sit 16px apart.
With a file tree, the code view now spans the window with the same page padding as diffs, the navbar and repository header widen to line up with it, and the tree sits in a bordered box instead of against the window edge.
…toolbar in a glass bar
unknwon
force-pushed
the
web-glass-style
branch
from
November 17, 2026 06:16
4ae37c1 to
cdb144c
Compare
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the pull request
Adds a frosted glass look to the web interface, following the Gogs 1.0 landing page: translucent panels with thin light edges over a soft color backdrop, in the light and dark themes. It is off by default, and the new "Glass mode" switch in the "Experiments" section of the settings menu, below the theme, turns it on. The choice is kept in
localStorage.With glass off, every page looks as it did before this change. Two exceptions: the code view with a file tree now uses the same layout as diffs (full window width with page padding, the navbar and repository header lined up with it, and the tree in a bordered box instead of against the window edge), and a contrast fix: destructive buttons in the dark theme now use dark text, since white on their coral fill was 2.85:1 and dark text is 6.95:1 (WCAG AA needs 4.5:1).
Link to the issue: n/a
How it works
index.htmlputsglass-uion<html>before the first paint, so there is no flash of the plain look.lib/glass.tsreads and stores the choice.:root.glass-ui, so the plain palette is untouched.glassfor boxes, comments, cards, settings panels and the diff workspaceglass-listfor lists of rows, e.g., the activity feed and repository listsglass-sectionfor a heading that labels a single box, so the heading becomes the panel's header row instead of floating above itglass-barfor the navbar and the repository headerglass-controlfor outline buttons and segmented groupsglass-solidfor filled buttons, which get a light sheen, a bright top edge, a ring and a soft glow like the landing page's call to actionglass-ui:variant handles layout that only the glass look needs, e.g., padding around a list that is flat without glass.--glass-control-hoverand--glass-line-hover, inside@media (hover: hover)so touch screens keep no sticky hover.With glass on, only page titles, page tabs and toolbars sit on the backdrop. Sidebars, rendered documents and standalone forms sit on panels too, columns sit 16px apart, and a panel inside another panel flattens. Every hand-styled button or link and every toolbar dropdown is a glass control, while form fields keep an inset field look with a stronger edge for 3:1 boundary contrast.
web/DESIGN.mddocuments the pattern in its "Glass" section.Screenshots
Glass on and off, repository home:
Code view spans the page width like the diff view. With glass on, the breadcrumb toolbar is a glass bar. In both looks, the file tree panel starts and ends with the file view:
The switch in the Experiments section of the settings menu:
Filled buttons with glass on:
Sidebars and hand-styled controls with glass on: sidebars are glass panels, and buttons like "Browse files", commit SHA links and the issue filters are glass controls:
Sections and forms with glass on: headings and tabs become panel header rows, and standalone forms are panels:
Other pages with glass on:
At 375px:
Checklist
Test plan
switch "Glass mode"witharia-checked. Its choice survives a reload, and without a stored choice glass is off.mainbuild (excluding sizes that drift with font loading).@pierre/diffssyntax colors, whichmainhas too. With glass on, axe cannot measure contrast over translucent backgrounds, so that was checked by eye.pnpm run lint,tscandpnpm run buildpass.AI usage
Written with Amp, which made the change, captured and reviewed the screenshots, and ran the checks above.