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

consider adding support for import * as #8

Open
idoros opened this issue Jul 16, 2017 · 2 comments
Open

consider adding support for import * as #8

idoros opened this issue Jul 16, 2017 · 2 comments
Labels
core Processing and transforming logic discussion Ongoing conversation feature New syntax feature or behavior

Comments

@idoros
Copy link
Collaborator

idoros commented Jul 16, 2017

Import currently allow default and named imports.
allow something like:

@st-import * as Everything from "./a";

Equal to in JS:

import * as Everything from "./a";

Where Everything is the reference to the entire module's contents.

Need to understand how access the exports in CSS:

.some-cls{
    -st-extends:Everything.something; /* doesn't look good in CSS */
}
@idoros idoros added the feature New syntax feature or behavior label Jul 31, 2017
@tomrav tomrav added future Intended for future roadmap discussion Ongoing conversation and removed future Intended for future roadmap labels Nov 22, 2017
@idoros
Copy link
Collaborator Author

idoros commented Jan 22, 2018

Summing up an offline discussion, the syntax for using a map of results:

@st-import * as Everything from "./a";

.a {
    color: value(Everything[a]);
}

We can support any type of import (params, CSS definitions, js exports) and in the future offer referencing mapped reference in selectors as well.

@tomrav tomrav added the core Processing and transforming logic label May 29, 2018
@hepiyellow
Copy link
Contributor

@barak007 @tomrav
Hi, Is this planned to be implemented soon?
We really need it !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Processing and transforming logic discussion Ongoing conversation feature New syntax feature or behavior
Projects
None yet
Development

No branches or pull requests

3 participants