add color fallback support#7522
Open
fikrydev wants to merge 8 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new shared stylesheet intended to define fallback theme color custom properties and includes it in the local SCSS entrypoint.
Changes:
- Adds
commons/ThemeColours.scsswith light/dark theme color variables and CSS custom property assignments. - Includes the new theme colors stylesheet from
stylesheets/Main.scss.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
stylesheets/Main.scss |
Adds the new theme color fallback stylesheet to the SCSS entrypoint. |
stylesheets/commons/ThemeColours.scss |
Defines fallback light/dark theme color custom properties. |
Comments suppressed due to low confidence (2)
stylesheets/commons/ThemeColours.scss:173
- The dark-theme wiki color assignments have the same undefined Sass variables as the light block (
$clr-wiki-...--darkis not defined anywhere in the stylesheets). Even if the light block is fixed, these references will still break the SCSS build unless the fallback values are defined or imported.
--clr-wiki-theme-primary: #{$clr-wiki-theme-primary--dark};
--clr-wiki-primary: #{$clr-wiki-primary--dark};
--clr-wiki-on-primary: #{$clr-wiki-on-primary--dark};
--clr-wiki-primary-container: #{$clr-wiki-primary-container--dark};
--clr-wiki-on-primary-container: #{$clr-wiki-on-primary-container--dark};
stylesheets/commons/ThemeColours.scss:168
- This dark-theme selector repeats the new single-colon pseudo-element form; the existing SCSS consistently uses
::before/::afterfor pseudo-elements (for examplestylesheets/Main.scss:81-82andstylesheets/commons/Colours.scss:689-690). Use the double-colon form here as well for consistency.
html.theme--dark,
html.theme--dark:before,
html.theme--dark:after {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+118
to
+122
| --clr-wiki-theme-primary: #{$clr-wiki-theme-primary--light}; | ||
| --clr-wiki-primary: #{$clr-wiki-primary--light}; | ||
| --clr-wiki-on-primary: #{$clr-wiki-on-primary--light}; | ||
| --clr-wiki-primary-container: #{$clr-wiki-primary-container--light}; | ||
| --clr-wiki-on-primary-container: #{$clr-wiki-on-primary-container--light}; |
Comment on lines
+116
to
+117
| html.theme--light:before, | ||
| html.theme--light:after { |
fix: endless loop in mapIndexes
* feat(Match2) : EVA Implementation * Match CopyPaste * Match Summary
…a/Lua-Modules into fix/add-color-fallback-support
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.
Summary
Add fallback definition for colors that was broken on lighthouse