Remove dead CSS by silverwind · Pull Request #37376 · go-gitea/gitea · GitHub
Skip to content

Remove dead CSS#37376

Open
silverwind wants to merge 5 commits intogo-gitea:mainfrom
silverwind:remove-dead-fomantic-css
Open

Remove dead CSS#37376
silverwind wants to merge 5 commits intogo-gitea:mainfrom
silverwind:remove-dead-fomantic-css

Conversation

@silverwind
Copy link
Copy Markdown
Member

@silverwind silverwind commented Apr 22, 2026

Removes CSS rules that have zero usages across templates, Go source, JS/TS/Vue, and options/. Each selector was cross-checked for runtime additions (Fomantic JS, library classes) before removal.

A few rules with no current usages are kept as symmetric pairs of heavily-used classes likely to be needed:

  • .ui.bottom.attached.header / .ui.bottom.attached.message — pair with the widely-used top.attached variants
  • .ui.warning.header / .ui.warning.segment — warning-themed variants of error-themed classes that are kept
  • .btn.small — size variant alongside the kept .btn.tiny

This PR was written with the help of Claude Opus 4.7

Cross-checked each selector against templates, Go source, JS/TS/Vue
and options/ to confirm zero usages before removal. Also drops
`-webkit-mask-*` prefixes where unprefixed equivalents are present
(Safari 15.4+, March 2022).

Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 22, 2026
@silverwind silverwind closed this Apr 22, 2026
@silverwind silverwind reopened this Apr 23, 2026
@silverwind silverwind requested a review from Copilot April 23, 2026 00:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes unused Fomantic UI-derived CSS rules and trims legacy vendor-prefixed mask declarations where unprefixed equivalents exist.

Changes:

  • Removed large sets of apparently-unused Fomantic UI selectors across component modules (grid/table/menu/message/etc).
  • Deleted page-specific/org-specific legacy styling blocks that no longer have matching markup.
  • Removed -webkit-mask-* declarations in favor of standard mask-* properties.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
web_src/css/shared/settings.css Removes prefixed -webkit-mask-* on toggle icon styling.
web_src/css/review.css Removes prefixed -webkit-mask-* for review warning icon.
web_src/css/org.css Removes legacy invite page #invite-box styling rules.
web_src/css/modules/table.css Removes unused .ui.table width variants (7/9/12–16 wide).
web_src/css/modules/segment.css Removes unused .ui.warning.segment rule.
web_src/css/modules/message.css Removes unused attached/bottom/yellow/red variants; keeps warning/error/info/success.
web_src/css/modules/menu.css Removes unused menu variants (center items, fluid tabular width tweak, etc).
web_src/css/modules/label.css Removes unused olive/basic purple/basic grey label variants.
web_src/css/modules/input.css Removes unused textarea/icon-input and circular/link icon positioning rules.
web_src/css/modules/header.css Removes unused header label/attached/warning variants.
web_src/css/modules/grid.css Removes unused grid column-count/relaxed/compact/centered-row-related rules.
web_src/css/modules/form.css Removes unused slider checkbox spacing and grouped inline fields rules.
web_src/css/modules/comment.css Removes unused nested comments/metadata styling from Fomantic comment module.
web_src/css/modules/codeeditor.css Removes prefixed -webkit-mask-* from code editor close icon styling.
web_src/css/modules/checkbox.css Removes prefixed -webkit-mask-* for checkbox/radio masked glyphs.
web_src/css/modules/card.css Removes unused .ui.three.cards layout rules.
web_src/css/modules/button.css Removes unused .btn.small font-size rule.
web_src/css/base.css Removes prefixed -webkit-mask-* from native select arrow icon styling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web_src/css/base.css
Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
@silverwind silverwind changed the title Remove dead Fomantic UI CSS and pre-2023 vendor prefixes Remove dead Fomantic UI CSS Apr 23, 2026
@silverwind silverwind changed the title Remove dead Fomantic UI CSS Remove dead CSS Apr 23, 2026
silverwind and others added 3 commits April 23, 2026 02:55
Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
@silverwind silverwind added type/refactoring Existing code has been cleaned up. There should be no new functionality. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/refactoring Existing code has been cleaned up. There should be no new functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants