codefloe/forgejo-codefloe
Watch
4
12
Fork
You've already forked forgejo-codefloe
0

refactor(ui): confine square corners to the classic CodeFloe themes #217

Merged
pat-s merged 1 commit from refactor/codefloe-square-corners into v16.0/forgejo-codefloe 2026-10-04 07:45:47 +00:00
Owner

Prepares the CodeFloe Tide theme (follow-up PR), which shares the codefloe- prefix and therefore the whole CodeFloe UI layer, but should keep Forgejo's rounded corners.

What changes

  • Every radius the layer removes moves into a new web_src/css/codefloe/ui/square.css: the three --border-radius*: 0px tokens from tokens.css, the radius declarations from controls.css and navigation.css, and all of surfaces.css (which held nothing else and is removed).
  • square.css is gated on :root[data-theme^="codefloe-"]:not(:where([data-theme^="codefloe-tide-"])).
  • Blocks in controls.css that also size controls keep their sizing; only the border-radius: 0 line left them.
  • Comments in focus.css, ui/index.css and two e2e specs now point at square.css.

Why the classic themes cannot change

:where() contributes no specificity and :not() takes its argument's, so every moved rule has exactly the specificity it had before.
The import sits directly after tokens.css, and no later rule in the layer sets border-radius on the same elements.

A shared radius variable was considered and rejected: these selectors cover all four corners, including inner corners of attached segments and button groups, so any non-zero value would round those too.

Verification

  • Pixel diff of full-page screenshots before and after, in codefloe-light and codefloe-dark, of repo home, issue list, pull list, issue view, pull view, settings form and code view: 0 differing pixels on all 14.
  • switch, dropdown and buttons e2e specs: 30 passed.
  • make lint-css and prek run -a: clean.

No README row: nothing users can see changes.

Prepares the CodeFloe Tide theme (follow-up PR), which shares the `codefloe-` prefix and therefore the whole CodeFloe UI layer, but should keep Forgejo's rounded corners. ## What changes - Every radius the layer removes moves into a new `web_src/css/codefloe/ui/square.css`: the three `--border-radius*: 0px` tokens from `tokens.css`, the radius declarations from `controls.css` and `navigation.css`, and all of `surfaces.css` (which held nothing else and is removed). - `square.css` is gated on `:root[data-theme^="codefloe-"]:not(:where([data-theme^="codefloe-tide-"]))`. - Blocks in `controls.css` that also size controls keep their sizing; only the `border-radius: 0` line left them. - Comments in `focus.css`, `ui/index.css` and two e2e specs now point at `square.css`. ## Why the classic themes cannot change `:where()` contributes no specificity and `:not()` takes its argument's, so every moved rule has exactly the specificity it had before. The import sits directly after `tokens.css`, and no later rule in the layer sets `border-radius` on the same elements. A shared radius variable was considered and rejected: these selectors cover all four corners, including inner corners of attached segments and button groups, so any non-zero value would round those too. ## Verification - Pixel diff of full-page screenshots before and after, in `codefloe-light` and `codefloe-dark`, of repo home, issue list, pull list, issue view, pull view, settings form and code view: 0 differing pixels on all 14. - `switch`, `dropdown` and `buttons` e2e specs: 30 passed. - `make lint-css` and `prek run -a`: clean. No README row: nothing users can see changes.
pat-s force-pushed refactor/codefloe-square-corners from dae7461396
All checks were successful
testing / test-unit (pull_request) Successful in 5m44s
testing / backend-checks (pull_request) Successful in 4m11s
testing / test-e2e (2/2) (pull_request) Successful in 2m23s
testing / frontend-checks (pull_request) Successful in 1m24s
testing / test-e2e (1/2) (pull_request) Successful in 2m34s
testing / test-pgsql (2/4) (pull_request) Successful in 6m41s
testing / test-pgsql (3/4) (pull_request) Successful in 9m25s
testing / test-pgsql (1/4) (pull_request) Successful in 7m57s
testing / test-pgsql (4/4) (pull_request) Successful in 9m20s
to f3aa3640bf
All checks were successful
testing / test-e2e (1/2) (pull_request) Successful in 3m21s
issue-labels / backporting (pull_request_target) Has been skipped
milestone / set (pull_request_target) Has been skipped
testing / test-unit (pull_request) Successful in 6m12s
testing / test-e2e (2/2) (pull_request) Successful in 2m54s
testing / test-pgsql (2/4) (pull_request) Successful in 7m46s
testing / test-pgsql (1/4) (pull_request) Successful in 8m58s
testing / test-pgsql (4/4) (pull_request) Successful in 12m7s
testing / backend-checks (pull_request) Successful in 5m29s
testing / test-pgsql (3/4) (pull_request) Successful in 10m47s
testing / frontend-checks (pull_request) Successful in 2m9s
2026-10-04 07:24:55 +00:00
Compare
pat-s merged commit 0d43d11000 into v16.0/forgejo-codefloe 2026-10-04 07:45:47 +00:00
pat-s deleted branch refactor/codefloe-square-corners 2026-10-04 07:45:48 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
codefloe/forgejo-codefloe!217
No description provided.