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

Feat: color preview in variables (#13) #64

Merged
merged 4 commits into from Nov 13, 2019
Merged

Conversation

jwhitmarsh
Copy link
Contributor

First cut at providing this. Borrowed the color parsing code from https://github.com/sergiirocks/vscode-ext-color-highlight/tree/master/src/strategies so currently it works for hexcodes, rgb, hsl, and "words" (red, blue, etc).

I know in #13 someone recommends using this but I can't see a way to get this to work.

I realise at this point that this is nowhere near 100% color type coverage - for instance, it doesn't handle Sass functions ($lighten, $darken, etc) - but this is a starting point.

@sergxp
Copy link

sergxp commented Mar 1, 2018

How do you install this on top of the marketplace one?

@jwhitmarsh
Copy link
Contributor Author

@mrmlnc do you want some support with this extension?

@sergxp in the mean time - (btw, this is not a pretty process)

  • Clone my repo to your local machine and cd to it
  • run npm install && npm run clean && npm run compile
  • remove the published version of this ext: rm -r $HOME/.vscode/extensions/mrmlnc.vscode-scss-0.6.2
  • copy my version into your extensions: cp -R {wherever you cloned my repo to} $HOME/.vscode/extensions/mrmlnc.vscode-scss-0.6.2

(If you're on Windows those paths are %USERPROFILE%\.vscode\extensions)

I wouldn't advocate this to everyone because you'll miss any updates to this repo, but it'll be useful to have other people testing this PR.

@mrmlnc
Copy link
Owner

mrmlnc commented Mar 1, 2018

Hello, @jwhitmarsh and @sergxp,

Sorry, guys, but #49 (comment) :(

@sergxp
Copy link

sergxp commented Mar 8, 2018

@jwhitmarsh Awesome man it works great for what I need, even if not 100%. Thanks!

@PixelT
Copy link

PixelT commented May 21, 2018

Any news / progress here?
@mrmlnc March / April has already passed ;)

@octref
Copy link
Collaborator

octref commented Nov 13, 2019

I rebased off master. This works for simple cases, but I guess that's already useful enough for people.

Since you are depending on https://www.npmjs.com/package/color lighten/darken would be doable as well. Maybe we'll get there one day!

@octref octref merged commit c5b2934 into mrmlnc:master Nov 13, 2019
@octref octref mentioned this pull request Nov 13, 2019
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

5 participants