Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] CSS var assignment only for less to less vars #116

Merged
merged 2 commits into from
Feb 24, 2020
Merged

Conversation

petermuessig
Copy link
Contributor

In case of more complex expressions as value of a rule, the css variable mapping logic detects this also as simple variable assignment. Therefore we need to introduce a more complex check for a simple variable assignment in the less code:

/resources/sap/ui/core/themes/sap_fiori_3/css-variables.css

SOURCE:
@sapUiShadowHeader: 0 0 0.25rem 0 fade(@sapUiContentShadowColor, 15), inset 0 -0.0625rem 0 0 @sapUiObjectHeaderBorderColor;

WAS (before var assignment feature):
--sapUiShadowHeader:0 0 .25rem 0 rgba(0,0,0,0.15),inset 0 -0.0625rem 0 0 #d9d9d9;

IS (with that var assignment feature):
--sapUiShadowHeader:var(--sapUiObjectHeaderBorderColor);

BECOMES (with this fix here):
--sapUiShadowHeader:0 0 .25rem 0 rgba(0,0,0,0.15),inset 0 -0.0625rem 0 0 #d9d9d9;

@petermuessig
Copy link
Contributor Author

I also included a test for this scenario.

@matz3 matz3 merged commit 2e9560d into master Feb 24, 2020
@matz3 matz3 deleted the fix-var-assignment branch February 24, 2020 08:16
@petermuessig
Copy link
Contributor Author

Thanks @matz3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants