-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Replacing global themed sass-vars to css-vars #4322
Conversation
Signed-off-by: Roman <ixrock@gmail.com>
…lt theme colors Signed-off-by: Roman <ixrock@gmail.com>
…lt theme colors Signed-off-by: Roman <ixrock@gmail.com>
@@ -0,0 +1,136 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this file should be committed, should it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it should. It's used in app as default values for themed variables + used by editor's css-vars auto-completion.
P.S. Most vscode
plugins for autocompleting css-variables support only defining exact file to read for variables, so could be useful too.
|
||
import fs from "fs-extra"; | ||
import path from "path"; | ||
import defaultBaseLensTheme from "../src/renderer/themes/lens-dark.json"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why only dark?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only? Because default could be just one as name says defaultBaseLensTheme
(could be default white tought)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah so this is only for the auto-complete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seem to be more colors in lens-light.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing this:
should be:
I thought it was a problem in master too because after testing your branch I pulled master and ran nvmmake dev
and got the same (bad) result. But when I ran make clean && make dev
on master it was good. This build target should be part of make dev
? Oh, it's probably just the transition between this PR and master, once it's merged there won't be this build issue moving forward.
|
||
import fs from "fs-extra"; | ||
import path from "path"; | ||
import defaultBaseLensTheme from "../src/renderer/themes/lens-dark.json"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seem to be more colors in lens-light.json
Signed-off-by: Roman <ixrock@gmail.com>
@lensapp/lens-maintainers ready for re-review / PTALA Added 2 missing theme colours to @jim-docker light theme seems to be fixed for now: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -37,7 +37,7 @@ | |||
align-self: center; | |||
|
|||
.LineProgress { | |||
color: $lensBlue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were lensBlue
and lensMagenta
defined somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, they where defined in linking sass-vars to css-vars in deleted theme-vars.scss
, e.g.
$lensBlue: var(--blue);
// ... other themed vars
PR highlights:
lens-dark.json
vscode
css-variables support / auto-completionsass
in future at all (ifpostcss
would be just enough)Recommended
vscode
extension for css-variables auto-complete:https://marketplace.visualstudio.com/items?itemName=phoenisx.cssvar
And add this to
settings.json
for auto-scanning css-variables in the project from all possible files: