-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
[jsst] A CSS string format which compiles to jss JSON #220
Comments
Sehr gut! |
Suggestions? |
@kof seems quite logical, tbh. Just a matter of personal preference. |
We should take an example from styled-components, but preprocess those tagged literals serverside and convert to jss json. |
It could be implemented as: import fromCSS, { keyframes } from 'jss-from-css'
const rotate360 = keyframes`
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
`
const styles = fromCSS`
button {
color: palevioletred;
display: block;
margin: 0.5em 0;
font-family: Helvetica, Arial, sans-serif;
&:hover {
text-decoration: underline;
animation: ${rotate360} 2s linear infinite;
}
}
` Also then push this package to language-babel plugin for syntax highlight in Atom: |
We could get some inspiration here:
And use this modules: |
Also we have to keep in mind this thread: https://github.com/geelen/css-components-demo |
I'm not sure if it's OK, but if yes - we could implement it in this way: |
Wow, preJSS looks awesome! |
I think we can close this and go with preJSS |
Using tagged template literals, we can create a css like syntax which easily compiles down to jss json.
The text was updated successfully, but these errors were encountered: