fix(theme): check real colors to support css variables #2857
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.
Description
This change allows to use CSS variables in custom themes for LESS variables which are basically used in color functions.
Although the themes changed variables are imported after the default theme, the LESS logic still tried to apply a css variable to a color function like "darken()" which of course does not work. It makes #737 complete now.
So this simple order results into "error evaluating darken()", although the variables are immediatly overridden:
By changing every existing color function call inside the default theme to check for a valid color value it is now possible to completely use CSS variables for a custom theme
Succesfully results into
Simply check the above code via https://lesscss.org/less-preview/
The minium LESS Version to support this is 3.12.0, so i had to raise the dependency 3.x version
Closes
#2855
#736