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 "params" ability to styles #32

Open
regisphilibert opened this issue Sep 2, 2021 · 0 comments
Open

Add "params" ability to styles #32

regisphilibert opened this issue Sep 2, 2021 · 0 comments

Comments

@regisphilibert
Copy link
Member

regisphilibert commented Sep 2, 2021

Just like we can easily pass params to the scripts which can be imported from the js code,

we could try and add the same for styles. Those could be inserted as css variables:

styles:
-  path: main.scss
    params:
      env: huge/env/Get()
      darkMode: true

Which would generate something like:

:root {
  --env: production;
  --darkMode: true;
}

I'm thinking it would be better to give control to user over the positioning of those variable declaration, shall it overwrite some of their own...

Maybe it could create a file which could then be imported by user mimicking the JS side of this...

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

No branches or pull requests

1 participant