refactor: cleanup stylesheet#1286
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
hugo-theme-stack | 269a851 | Commit Preview URL Branch Preview URL |
Mar 05 2026, 09:39 AM |
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the SCSS codebase to remove unused/redundant rules and centralize repeated “card” styling, aiming to reduce duplication and improve consistency across components.
Changes:
- Removed unused CSS variables/classes and consolidated redundant definitions (shadows, hamburger states, grid flex-direction).
- Introduced a shared
card-stylemixin and replaced repeated card declarations with the mixin. - Simplified highlight/code-block backgrounds by making nested
pretransparent inside.highlight.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| assets/scss/variables.scss | Removes unused shadow vars and redundant pre-color defaults. |
| assets/scss/style.scss | Imports new mixins.scss so mixins are available to partials. |
| assets/scss/mixins.scss | Adds shared card-style mixin to reduce duplicated card declarations. |
| assets/scss/partials/article.scss | Applies card-style mixin to article list variants; minor hover styling change. |
| assets/scss/partials/cookies.scss | Replaces repeated card props with mixin; updates shadow var usage and removes redundant width. |
| assets/scss/partials/layout/article.scss | Makes inner pre transparent inside .highlight; removes redundant margin rule. |
| assets/scss/partials/menu.scss | Removes redundant active/hover hamburger rules in favor of existing themed styling. |
| assets/scss/grid.scss | Removes unused .flex.column; standardizes flex-direction to row at md breakpoint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
powerfullz
pushed a commit
to powerfullz/hugo-theme-stack-upstream
that referenced
this pull request
Mar 10, 2026
* refactor: cleanup stylesheet * Update assets/scss/partials/article.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Did some code cleanup using AI:
1. Resolved Issues
Unused styles removed:
--shadow-l4removed from variables.scss..flex.columnremoved from grid.scss.Redundant definitions cleaned:
--shadow-l3was identical to--shadow-l2. All references to--shadow-l3(e.g., in cookies.scss have been updated to use--shadow-l2, and--shadow-l3has been removed.#000background was removed in favor of the existing themed--accent-color..hamburger.is-active:hoverrule (duplicate of.hamburger:hover).width: autoproperty in the medium breakpoint block for.cookie-banner__settings-link.--pre-background-colorand--pre-text-colorsince they are always redefined within color scheme blocks.margin: initialin.highlight pre.Standardized Styles:
flex-direction: unsetvalue in grid.scss, replacing it with the standardrow.2. Refactoring & Optimization
Card Style Abstraction
A new shared mixin,
card-style, was created in assets/scss/mixins.scss:This mixin is now used across:
.article-list article.article-list--compact.article-list--tile articleThis significantly reduces code duplication and ensures visual consistency for card-based elements.
Highlight Block Optimization
In layout/article.scss, redundant background colors were cleaned up for code highlight blocks by setting the inner
prebackground totransparentwhen a parent.highlightcontainer already has the background applied.