Skip to content

[Styles] Remove unused SCSS rules - #1408

Merged
sarajkrishnasingh merged 2 commits into
layer5io:masterfrom
AbhiramDhanvi:fix/remove-unused-scss
Dec 5, 2026
Merged

sarajkrishnasingh merged 2 commits into
layer5io:masterfrom
AbhiramDhanvi:fix/remove-unused-scss

Conversation

@AbhiramDhanvi

@AbhiramDhanvi AbhiramDhanvi commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Notes for Reviewers

This PR fixes #1170.

  • Removed unused styles in assets/scss/: taxonomy, Discourse footer, handbook card, subscription callout, .prevBtn, .table-container, and a few leftover selectors.
  • In assets/scss/_styles_project.scss, removed the duplicate @import "elements_project"; and the repeated .dashboard and a.dash-sign:hover rules.
  • Tested with npm run build and npm run build:production. I also compared the compiled main.css before and after, and no live rules changed.

Signed commits

  • Yes, I signed my commits.

Summary by CodeRabbit

  • Style
    • Removed styling for the handbook section and image, previous buttons, and several taxonomy elements, including tag and blog teaser styling.
    • Removed horizontal scrolling and width constraints previously applied to content tables.
    • Removed assorted dashboard, footer, and subscription styling rules, including some layout and responsive styles. Some page elements may now appear or behave differently.
    • Removed a duplicate style import and several redundant or page-specific rules.

Signed-off-by: Abhiram Dhanvi <abhiramcr2726@gmail.com>
Copilot AI balanced review requested due to automatic review settings December 4, 2026 20:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

This change removes SCSS rules from several project stylesheets and removes a duplicate import. The remaining mobile dashboard rule sets the font size to 3rem and centers the text.

Changes: SCSS Rule Cleanup

Layer / File(s) Summary
Component style removals
assets/scss/_content_project.scss, assets/scss/_elements_project.scss, assets/scss/_footer_project.scss, assets/scss/_landing_project.scss
Styles for content tables, previous buttons, footer elements, and handbook components were removed.
Project stylesheet cleanup
assets/scss/_styles_project.scss
A duplicate import and several project-level style rules were removed. The mobile dashboard rule sets the font size to 3rem and centers the text.
Taxonomy and subscription styles
assets/scss/_subscription.scss, assets/scss/_tax_project.scss
Subscription utility rules and taxonomy-related styling were removed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested reviewers: leecalcote

Merge Risk: Low · up to e0b85

Removing the unused-style rules is mostly safe. One rule is still live: the .mt-1 rule in _subscription.scss. The plan callout partial, included by four page layouts, uses it. The plan callout icon now sits about 4px closer to its text. The effect is cosmetic and easy to fix by restoring the rule. This should not block merging.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "[Styles] Remove unused SCSS rules" matches the main change. The PR removes unused rules from several SCSS files, including taxonomy, footer, handbook, subscription, prevBtn, and table-conta…
Linked Issues check Passed [#1170] The issue asks the contributor to identify and remove unused SCSS rules. It cites the _tax_project.scss rule at line 143 of the base revision. The change summary shows the `_tax_project.scss…
Out of Scope Changes check Passed All changes in the reviewed diff remove SCSS rules or a duplicate @import in assets/scss/. The summary reports no added or altered declarations, and no exported or public entity changes. These rem…
Full details: Title check

Explanation

The title "[Styles] Remove unused SCSS rules" matches the main change. The PR removes unused rules from several SCSS files, including taxonomy, footer, handbook, subscription, prevBtn, and table-container styles, and removes a duplicate import and duplicate rules. The title is concise and specific enough for a teammate to understand the primary change. The title does not mention the duplicate import removal, but it does not need to cover every detail.

Full details: Linked Issues check

Explanation

[#1170] The issue asks the contributor to identify and remove unused SCSS rules. It cites the _tax_project.scss rule at line 143 of the base revision. The change summary shows the _tax_project.scss removals of 169 lines, including the taxonomy text-tag and fruit-tag styling, which contains the cited example. The other files also contain removals of unused rules: .table-container in _content_project.scss, .prevBtn in _elements_project.scss, the Discourse footer and sidebar styling in _footer_project.scss, handbook styles in _landing_project.scss, and the duplicate elements_project import and duplicate dashboard rules in _styles_project.scss. The restored .bwnekH and .f4 selectors in _subscription.scss are not in the removal list, so the restoration is consistent with the summary. The issue sets no other acceptance criteria. Limitations: this assessment relies on the change summary for files other than _tax_project.scss. Unused status of each removed selector depends on the author's compiled CSS comparison, which this review did not repeat.

Full details: Out of Scope Changes check

Explanation

All changes in the reviewed diff remove SCSS rules or a duplicate @import in assets/scss/. The summary reports no added or altered declarations, and no exported or public entity changes. These removals match the unused-rule cleanup in #1170. Some removed selectors, such as .matterheader, .plan-icon, .card-header .bg-white, and the third-party red-text selectors, are not named in the PR description. They fall within the same cleanup category and show no unrelated behavior. Limitation: the removal of these selectors was not checked line by line in this review.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 022acead-4375-42ad-8673-57ddbc213a60
Commits

Reviewing files that changed from the base of the PR and between 201f540 and e0b85de.

Files selected for processing: 1

  • assets/scss/_subscription.scss
Files skipped from review as they are similar to previous changes: 1

  • assets/scss/_subscription.scss

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview deployment: https://docs.layer5.io/pr-preview/pr-1408/

Note: Preview may take a moment (GitHub Pages deployment in progress). Please wait and refresh. Track deployment here

@sarajkrishnasingh sarajkrishnasingh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice cleanup, and well scoped for #1170: 391 deletions, zero additions, and the duplicate @import "elements_project" plus the doubled .dashboard media query are exactly the kind of leftovers worth removing. Verifying with npm run build, the production build, and a compiled CSS comparison is the right check for a deletion-only change, and all three checks are green.

I spot-checked the removed selectors against the templates, and most of them are genuinely dead: .table-container, .prevBtn, .handbook-section, .handbook-card, .matterheader, .plan-icon, and the taxonomy example classes appear only in their own SCSS definitions.

One thing worth a look before merge: the _subscription.scss removal is not all dead code. layouts/partials/plan-info.html is still included by four layouts (docs list, video list, rest-apis, content), and it uses two of the removed classes that have no other definition in the repo: .bwnekH styles the outer "Who can use this feature?" callout box, and .f4 sets its heading to 16px. Dropping them will remove the callout border and padding and let the heading fall back to default h2 sizing. The other three (.d-inline-block, .mb-3, .mt-1) are covered by Bootstrap utilities, so those are fine.

If the callout still looks right in the PR preview, this is good to go. If the border or heading size changed, the suggestion below restores just those two rules and keeps the rest of the cleanup intact.

Small note: removing a.dash-sign:hover also drops the gold hover color on the landing page sign-in links (used in content/en/_index.md), so a quick glance at that hover state in the preview is worth it too.

Comment thread assets/scss/_subscription.scss Resolved
Signed-off-by: Abhiram Dhanvi <abhiramcr2726@gmail.com>

@sarajkrishnasingh sarajkrishnasingh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for addressing the feedback. Restoring .bwnekH and .f4 in commit e0b85de keeps the plan-info callout styling intact while the duplicate Bootstrap utilities stay removed, which is exactly the right split for #1170.

The rest of the cleanup checks out: 377 deletions, zero additions, the duplicate @import "elements_project" and the doubled .dashboard rules are gone, and the build, DCO, and CodeRabbit checks are all green on the latest commit. The a.dash-sign:hover removal drops the gold hover on the landing page sign-in links, a small visual change worth knowing about, but it does not block this cleanup.

Approving and merging.

@sarajkrishnasingh
sarajkrishnasingh merged commit f8932f9 into layer5io:master Dec 5, 2026
3 checks passed
@AbhiramDhanvi
AbhiramDhanvi deleted the fix/remove-unused-scss branch December 5, 2026 08:59
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.

[Debt] Unused scss rules should be removed

3 participants