Skip to content

Adding support for hex colors #4

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sugaaloop
Copy link

Hi! Not sure if you have any interest, I came across a use case for adding colors dynamically from gulp into sass (white-labeling an application) and wanted to see what you thoughts were for injecting hex colors. I needed the colors available in both sass and javascript and didn't want to define them twice.

I know it's a little hacky, but I couldn't think of a cleaner way to identify a hex color in JS.

making hex color parsing optional


checking input length before checking char[0]
@squatto
Copy link

squatto commented Sep 3, 2018

I just found this PR because I need the exact same thing: externally-defined color variables in a white labeled application. This would be great!

@squatto
Copy link

squatto commented Sep 3, 2018

@sugaaloop for now you could use this: https://github.com/giowe/gulp-sass-vars - it would be simple to export a JS object from a file so that you could dynamically set your variables.

@sugaaloop
Copy link
Author

@squatto i'm currently using my "fork". gulp-sass-vars is using parse-sass-value, which looks like exactly what we're looking for. i might check it out, but for now this PR is working well enough.

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.

2 participants