Allows for config.yml to control header colors. #24
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.
This allows the header colors to be controlled by the config.yml and defaults back to your color setup.
SCSS Variables to CSS Custom Properties
First, I replaced the SCSS variables with CSS Custom Properties to allow for programmatic control. Since you are already using
fetch()
without a poly-fill this barely changes the acceptable browsers, and is identical with regards to latest versions.Second, since you cannot use SASS's
lighten
with thevar()
syntax, I created a new color that is mostly transparent white. Sincelighten
was used only as a menu background :hover effect, this creates the same effect. It also makes it background color agnostic as it will lighten any color that is selected (except for already super light colors).Style Control on id=#app
The bound
style
property on id=#app now allows for context changing of the CSS Custom Properties. If the property doesn't exist in the Vue model, no style change is added (i.e. back to default). This makes it backwards compatible with config.yml files that don't have colors in them instead of throwing a Vue error if someone updates but doesn't define the colors.Config.yml
Added the commented out property flags that can be used to change the colors. I went with
primary-color
andsecondary-color
as that was your previous naming convention in the SCSS file.CSS File
Sorry for all the changes in the CSS file, but I couldn't get
dart-sass
to duplicate your output. This is default output with the flag:sass --no-source-map ./app.scss ./app.css