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

Add option to generate it as variables-css #12

Open
javierartero opened this issue Jan 13, 2021 · 0 comments
Open

Add option to generate it as variables-css #12

javierartero opened this issue Jan 13, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@javierartero
Copy link
Member

Generate an option in the cli to generate css variables in a :root {}.

This file must be CSS to be used from any processor.

@function svgpack-imagotype($color: #ef1625) {
  $color: str-replace(inspect($color), "#", "%23"); //fix and replace hexcolor
  @return url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 440 90'%3E%3Cg fill='"+$color+"' fill-rule='evenodd'%3E%3Cpath ...");
}

we need something like this:

:root {
  --svgpack-imagotype: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 440 90'%3E%3Cg fill='%23ef1625' fill-rule='evenodd'%3E%3Cpath ...");
  --others-vars:  url("...");
  }
@javierartero javierartero added the enhancement New feature or request label Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant