Skip to content

CSS cleanup: dead CSS removal, !important reduction, missing CSS, pseudo-element syntax, dead macros - #203

Draft
1aeo wants to merge 4 commits into
masterfrom
cursor/development-environment-setup-b734
Draft

CSS cleanup: dead CSS removal, !important reduction, missing CSS, pseudo-element syntax, dead macros#203
1aeo wants to merge 4 commits into
masterfrom
cursor/development-environment-setup-b734

Conversation

@1aeo

@1aeo 1aeo commented Mar 21, 2026

Copy link
Copy Markdown
Owner

CSS Cleanup — Dead CSS, !important reduction, missing CSS, pseudo-element syntax, dead macros

Pure CSS + template housekeeping — no behavioral changes, zero HTML output diff.

Dead CSS Removed (11 selectors)

aroi-leaderboards.css (10 selectors):

  • .aroi-flex-nav, .aroi-nav-spacing (+h4), .aroi-primary-nav, .aroi-category-nav
  • .aroi-compact-nav-row, .aroi-nav-label, .aroi-nav-separator
  • .aroi-top-margin, .aroi-contact-link

allium-base.css (1 selector):

  • .al-section-title
  • .al-box-success / .al-box-info / .al-box-primary annotated as unused but kept to complete the semantic design system set

Dead Macros Removed (194 lines)

aroi_macros.html:

  • paginated_ranking_table (88 lines) — defined but never called
  • top5_paginated_ranking_table (106 lines) — imported but never called
  • Both had latent bugs: pagination IDs (-1-25, -1-5) didn't match the CSS default-show rules ([id$="-1-10"]), so no page would show by default if reactivated
  • Dead import cleaned up from aroi-leaderboards.html

!important Reduction (5 → 0 removable; 5 justified keeps)

Declaration File Reason safe to remove
navbar-collapse { display/height/overflow } (3) allium-base.css Mutually exclusive media queries (min-width: 768px vs max-width: 767px) — no competing rules
.panel-body:hover { box-shadow } aroi-leaderboards.css Hover selector (0,3,0) already outranks tier class (0,1,0)
.pagination-section:target ~ ... aroi-leaderboards.css Selector (0,4,0) already outranks default page rule (0,2,0)

Remaining 5 !important usages are justified (documented in code comments):

  • Search bar responsive (4): Required to override Bootstrap's !important on .hidden-xs/.visible-xs
  • :target highlight (1): Required to override inline style="background:..." attributes

Missing CSS Added

Class File Purpose
.row-not-voted relay-info.css Dim authority table rows where the authority did not vote (opacity: 0.55)
.aroi-validation-table aroi-leaderboards.css Column widths for Validation Champions table (7 columns)
.aroi-ip-address-table aroi-leaderboards.css Column widths for IPv4/IPv6 Leaders tables (9 columns)

Pseudo-element Syntax

  • Updated :before/:after::before/::after in authorities-page-mockup.html
  • Added comment documenting the tooltip CSS duplication with allium-base.css

Stale Comments Fixed

Fixed 4 comments in allium-base.css that referenced .html template files instead of the actual .css files where styles were moved:

  • relay-info.htmlrelay-info.css
  • aroi-leaderboards.htmlaroi-leaderboards.css
  • network-health-dashboard.htmlnetwork-health.css
  • api-diagnostics.htmlapi-diagnostics.css

Verification

  • Output comparison: 27,601 files compared — only CSS file diffs (expected) + live API data drift
  • All 827 tests pass
  • Lint clean
  • Visual verification: homepage badges, pagination, responsive navbar, relay detail pages all working correctly
  • Dead macro removal produces zero output diff (macros were never called)

Out of Scope (as agreed)

  • ~618 inline style="..." attributes → separate effort
  • External CSS file extraction
  • CSS minification
  • Converting ~200+ inline style="color: #28a745" to CSS classes
Open in Web Open in Cursor 

Co-authored-by: 1aeo <1aeo@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Mar 21, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4e542799-e4ec-4e5a-8603-d25b6718fdb2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/development-environment-setup-b734

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…udo-element syntax

Dead CSS removed (10 selectors from aroi-leaderboards.css):
- .aroi-flex-nav, .aroi-nav-spacing, .aroi-primary-nav, .aroi-category-nav
- .aroi-compact-nav-row, .aroi-nav-label, .aroi-nav-separator
- .aroi-top-margin, .aroi-contact-link

Dead CSS removed (1 selector from allium-base.css):
- .al-section-title (unused utility)
- Annotated .al-box-success/.al-box-info/.al-box-primary as unused but kept
  to complete the semantic design system set

!important reduction (5 declarations across 2 files):
- allium-base.css: navbar-collapse desktop override (3 props) — mutually
  exclusive media queries make !important unnecessary
- aroi-leaderboards.css: badge hover box-shadow — higher specificity wins
- aroi-leaderboards.css: pagination section hide — higher specificity wins

Missing CSS added:
- relay-info.css: .row-not-voted (dim non-voting authority rows)
- aroi-leaderboards.css: .aroi-validation-table column widths
- aroi-leaderboards.css: .aroi-ip-address-table column widths
- aroi-leaderboards.css: .pagination-nav styling (matches .pagination-nav-bottom)

Pseudo-element syntax (docs mockup):
- Updated :before/:after to ::before/::after in authorities-page-mockup.html
- Added comment documenting the tooltip CSS duplication with allium-base.css

Co-authored-by: 1aeo <1aeo@users.noreply.github.com>
@cursor cursor Bot changed the title Add AGENTS.md with Cursor Cloud development environment instructions CSS cleanup: dead CSS removal, !important reduction, missing CSS, pseudo-element syntax Mar 21, 2026
cursoragent and others added 2 commits March 23, 2026 05:55
…not-voted opacity

- .pagination-nav styling reverted: class only used by dead macros
  (paginated_ranking_table and top5_paginated_ranking_table are defined
  but never called). All active call sites use pagination_section macro
  which only uses .pagination-nav-bottom.

- .row-not-voted opacity bumped from 0.5 to 0.55 for better readability
  of links and status indicators within dimmed authority rows.

Co-authored-by: 1aeo <1aeo@users.noreply.github.com>
- Remove paginated_ranking_table macro (defined but never called, 88 lines)
- Remove top5_paginated_ranking_table macro (defined but never called, 106 lines)
- Remove dead import of top5_paginated_ranking_table from aroi-leaderboards.html
- Both macros had latent bugs: pagination IDs (-1-25, -1-5) didn't match
  the CSS default-show rules ([id$="-1-10"]), so no page would show by default

- Fix 4 stale comments in allium-base.css that referenced .html template
  files instead of the actual .css files where styles were moved:
  relay-info.html → relay-info.css
  aroi-leaderboards.html → aroi-leaderboards.css
  network-health-dashboard.html → network-health.css
  api-diagnostics.html → api-diagnostics.css

Co-authored-by: 1aeo <1aeo@users.noreply.github.com>
@cursor cursor Bot changed the title CSS cleanup: dead CSS removal, !important reduction, missing CSS, pseudo-element syntax CSS cleanup: dead CSS removal, !important reduction, missing CSS, pseudo-element syntax, dead macros Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants