Merged
Conversation
…; set root scheme as light or dark based on luminance of background color
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors Memberlite’s styling system by consolidating CSS, moving typography/spacing to theme.json presets, and shifting dark/light styling to an automatic luminance-based approach (removing the manual dark mode toggle and related assets/integrations).
Changes:
- Consolidate/modernize styling in
style.css(custom properties for semantic message colors; convert hardcoded sizes totheme.jsonpreset vars). - Add automatic dark/light detection via WCAG relative luminance (
memberlite_is_dark_color) and applyis-style-dark/is-style-lightpluscolor-scheme. - Remove Theme My Login integration and the legacy
memberlite_darkcsstheme mod (andcss/dark.css).
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| theme.json | Reformat and adjust presets/usages; adds caption color; reduces root spacing config. |
| style.css | Introduces semantic alert variables, migrates many values to preset vars, and folds dark-mode behaviors into the main stylesheet. |
| js/customizer.js | Adds luminance-based dark detection for live preview and updates color-scheme dynamically. |
| inc/updates.php | Removes obsolete memberlite_darkcss mod during updates and bumps DB version. |
| inc/integrations/theme-my-login.php | Removes Theme My Login integration hook/enqueue file. |
| inc/extras.php | Switches body dark/light class logic from a theme mod toggle to luminance-based detection. |
| inc/defaults.php | Removes the memberlite_darkcss default. |
| inc/customizer.php | Stops exposing the dark-mode checkbox; outputs color-scheme based on luminance. |
| inc/colors.php | Adjusts default scheme colors; adds memberlite_is_dark_color() helper. |
| functions.php | Stops enqueuing css/dark.css and removes Theme My Login integration loading. |
| css/dark.css | Deletes legacy dark-mode stylesheet. |
| css/bbpress.css | Replaces hardcoded border colors with --memberlite-color-borders. |
| adminpages/tools.php | Skips importing deprecated memberlite_darkcss theme mod. |
Comments suppressed due to low confidence (1)
functions.php:750
- PR description says
css/memberlite-shortcodes.cssandcss/theme-my-login.csswere removed, but both files still exist in the repo and (with the integration removed here) appear to be unused. Consider deleting the unused CSS files (and any references/docs) to avoid shipping dead assets and reduce maintenance overhead.
/* Integration for LifterLMS. */
if ( class_exists( 'LifterLMS' ) ) {
require_once get_template_directory() . '/inc/integrations/lifterlms.php';
}
/* Integration for WooCommerce. */
if ( function_exists( 'is_woocommerce' ) ) {
require_once get_template_directory() . '/inc/integrations/woocommerce.php';
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
RachelRVasquez
pushed a commit
to RachelRVasquez/memberlite
that referenced
this pull request
Mar 12, 2026
* Working on merging / consolidating colors and dark mode into main css * Streamlining colors, spacing, and sizing to theme.json * Color scheme more like the current Memberlite 6.1.1 default * Resolving issue with spacing; requiring theme.json version 2, not 3 yet * Fixing grid spacing / responsive * Expanding spacing for archive view * Continue styling stremlining * All the style improvements; eliminate the dark css file and theme mod; set root scheme as light or dark based on luminance of background color * Updating the updates db version (consolidating updates) * Discoveries in changes introduced while pull this to live PMPro site for testing * Resolving issue with update script and fallbacks present in dev * Fallbacks preserved for masthead and footer widgets * Fixing css error
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:
This PR streamlines the theme's CSS architecture by consolidating stylesheets, introducing CSS custom properties for consistent color management, and migrating hardcoded values to WordPress theme.json presets. It also introduces a centralized color system with new color schemes, automatic dark/light mode detection, and a robust migration path for existing users.
Automatic Dark/Light Mode
Consolidated CSS Files into style.css
Introduced CSS Custom Properties for Message/Alert Colors
Migrated to WordPress theme.json Presets
Refined theme.json Values
Import/Export Improvements (adminpages/tools.php)
Cleanup
How to test the changes in this Pull Request:
Other information:
Changelog entry
style.css.