Sass refactor#220
Merged
RachelRVasquez merged 22 commits intostrangerstudios:memberlite-7-0from Mar 3, 2026
Merged
Conversation
…rm styles on pmpro
… I regression test
…rganized some of the styles/files
…ion in other files
…e alignment floats
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors Memberlite’s front-end styling from a single large style.css into a Sass-based structure under src/scss/, updates the build tooling to compile Sass into theme CSS assets, and adjusts a couple of bundled color schemes for accessibility/visual fixes.
Changes:
- Replace the legacy monolithic
style.cssrules with a Sass codebase (src/scss/**) intended to compile intobuild/css/main.css. - Update the theme enqueue/build process: remove the old grid stylesheet, add a new compiled “main” stylesheet, and revise
package.jsonscripts + docs. - Tweak “Midnight Violet” and “Cocoa Ash” scheme values for improved contrast/accessibility targets.
Reviewed changes
Copilot reviewed 32 out of 33 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| style.css | Keeps only theme header metadata; removes legacy compiled CSS rules. |
| functions.php | Stops enqueuing css/grid.css; enqueues compiled build/css/main.css. |
| package.json | Adds Sass + npm-run-all; introduces CSS build/watch scripts and aggregates build. |
| docs/build-process.md | Updates build documentation to reflect Sass compilation and new scripts. |
| css/grid.css | Removes legacy standalone grid stylesheet. |
| adminpages/admin_footer.php | Removes an extra clearing div from admin footer markup. |
| inc/colors.php | Updates scheme colors (Midnight Violet + Cocoa Ash). |
| src/scss/main.scss | New Sass entrypoint organizing imports for the compiled stylesheet. |
| src/scss/abstracts/_variables.scss | Adds Sass variables for alert colors/shadows/fonts. |
| src/scss/abstracts/_mixins.scss | Adds breakpoint/util mixins for refactored Sass structure. |
| src/scss/base/_reset.scss | New CSS reset (modernized). |
| src/scss/base/_base.scss | Base element/type styles migrated from legacy CSS. |
| src/scss/base/_utilities.scss | Utility classes migrated (align, hide, screen-reader, text sizes). |
| src/scss/base/_alerts.scss | Alert/message styling migrated and standardized (Sass variables). |
| src/scss/base/_buttons.scss | Button styling migrated with variant classes and hover states. |
| src/scss/base/_forms.scss | Form styles migrated and updated (borders, spacing, focus). |
| src/scss/base/_grid.scss | New Sass-based grid system replacing css/grid.css. |
| src/scss/blocks/_blocks.scss | Adds block-specific styles (tables, quotes, search, images, query). |
| src/scss/components/_breadcrumbs.scss | Breadcrumb component styling migrated. |
| src/scss/components/_comments.scss | Comment list/reply form styling migrated. |
| src/scss/components/_grid-list.scss | Grid-list component styling migrated. |
| src/scss/components/_pagination.scss | Pagination/navigation styling migrated. |
| src/scss/components/_shortcodes.scss | Memberlite shortcode styles migrated (banners/tabs/accordion/etc). |
| src/scss/components/_widgets.scss | Sidebar/widget styles migrated. |
| src/scss/components/_banner.scss | Adds bottom banner styles (#banner_bottom) as a separate partial. |
| src/scss/structure/_header.scss | Header + navigation + mobile nav styles migrated. |
| src/scss/structure/_masthead.scss | Masthead/banner/byline styles migrated. |
| src/scss/structure/_footer.scss | Footer widgets/nav/site-info styles migrated. |
| src/scss/structure/_content.scss | Entry/content/footer/author box styles migrated. |
| src/scss/pages/_blog.scss | Blog/single layout + alignment rules migrated. |
| src/scss/pages/_404.scss | 404/search-no-results layout styles migrated. |
| src/scss/pages/_page.scss | Page template layout + alignwide/full handling migrated. |
| src/scss/plugins/_pmpro.scss | PMPro integration styles migrated and reorganized. |
Comments suppressed due to low confidence (4)
src/scss/blocks/_blocks.scss:152
- These selectors compile to
.wp-block-image.figure.alignleft/right, which won’t match the usual block markup (.wp-block-image figure.alignleft/right ...). As a result, the mobile float reset won’t apply. Change this to target descendantfigure.alignleft/figure.alignrightinside.wp-block-image(or otherwise align with the actual rendered HTML structure).
.wp-block-image {
&.alignfull {
text-align: center;
}
&.figure.alignleft,
&.figure.alignright {
@include breakpoint(mobile) {
@include reset-alignment-floats-mobile;
}
src/scss/base/_alerts.scss:104
.alertis usingvar(--memberlite-color--alert-text)(double--beforealert-text). The theme’s customizer generates variables in the--memberlite-color-{css_var}form, so this variable name won’t exist and the color rule will be ignored. Use the correct variable name (or the existing$color-alert-textSass variable used elsewhere in this file).
.alert {
color: var(--memberlite-color--alert-text);
}
src/scss/base/_buttons.scss:99
.btn_success:hoversetsbackground-colorto$color-success-text, which is the same value as the base.btn_successbackground and differs from the previous behavior (hover used the success link color). This likely prevents any visible hover state for success buttons. Consider switching the hover background to$color-success-link(consistent with the other variants).
.btn_success:hover {
background-color: $color-success-text;
}
src/scss/main.scss:66
src/scss/components/_banner.scssdefines the#banner_bottomstyles, butmain.scssdoesn’t import that partial. Since#banner_bottomis still rendered byinc/page_banners.php, its styling will be missing from the compiledmain.css. Add an import for the banner partial (and include it in the ToC if applicable) so the bottom banner remains styled.
@import "components/breadcrumbs";
@import "components/comments";
@import "components/grid-list";
@import "components/pagination";
@import "components/shortcodes";
@import "components/widgets";
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
All Submissions:
Changes proposed in this Pull Request:
🎉 When compared to the old stylesheet, the newly compiled stylesheet is 310 lines less. 🎉
Bugs Resolved & Tasks Completed:
style.css- Updated the PHP version we support to 7.4.0.Enhancements:
styles.cssfile into asrc/scssdirectory.CSS/_grid.cssfile and instead added a cleaner grid (based on the old one, but less code!) tosrc/scss/base/_grid.scss.docs/) about the build process.How to test the changes in this Pull Request:
docs/build-process.mdmemberlite-7-0branch on the front-end. Two separate environments will make this easier.Other information:
Changelog entry