refactor(ui): confine square corners to the classic CodeFloe themes #217
No reviewers
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
codefloe/forgejo-codefloe!217
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/codefloe-square-corners"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
web_src/css/codefloe/ui/square.css: the three--border-radius*: 0pxtokens fromtokens.css, the radius declarations fromcontrols.cssandnavigation.css, and all ofsurfaces.css(which held nothing else and is removed).square.cssis gated on:root[data-theme^="codefloe-"]:not(:where([data-theme^="codefloe-tide-"])).controls.cssthat also size controls keep their sizing; only theborder-radius: 0line left them.focus.css,ui/index.cssand two e2e specs now point atsquare.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 setsborder-radiuson 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
codefloe-lightandcodefloe-dark, of repo home, issue list, pull list, issue view, pull view, settings form and code view: 0 differing pixels on all 14.switch,dropdownandbuttonse2e specs: 30 passed.make lint-cssandprek run -a: clean.No README row: nothing users can see changes.
dae7461396f3aa3640bf