-
Notifications
You must be signed in to change notification settings - Fork 5
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
Distributed less variables and mixins ? #1
Comments
And should add that template literals in that case now works too: {/*language=LESS*/}
<style jsx>{`
.ActionButton {
height: 40px;
width: 100%;
background-color: ${lessVariables['@orangish']};
display: flex;
align-items: center;
justify-content: center;
transition: background-color 250ms ease;
cursor: pointer;
text-decoration: none;
&:hover {
background-color: ${lessVariables['@dark']};
}
&__label {
color: white;
text-transform: uppercase;
font-size: 14px;
font-weight: 600;
cursor: pointer;
}
}
`}</style> Will give you: |
Thank you, I think that add support for global variables is a little hard to implement, but yo should be able to import them. Any help is welcome. This is a related issue in the sass plugin: |
any solutions ? plz |
Sorry to say guys, I should not say this in thread, but we switched to PostCSS plugin for styled jsx(with nesting, prefixing, media queries, etc), seems parser cannot handle variables in template strings. P.S. Sorry No mixins unfortunately. In this case much more configurable will be webpack with custom loaders, but for someone it is not an option. |
For example i have:
and
@orangish;
and@dark
should be global variablesPlease add it to readme or, show me how i can get it and I will fill it for you
The text was updated successfully, but these errors were encountered: