I had an idea, creating a programming language with a dynamic syntax. Meaning, every programmer can extend the language easily and implement syntactic sugars fast.
import { createUseStyles } from 'react-jss';
// use native css styles with your code
const useStyles = createUseStyles(
.root {
padding: 1em;
border-radius: 0.2em;
background: #f93;
color: #fff;
text-align: center;
cursor: pointer;
}
);
Result:
import { createUseStyles } from 'react-jss';
const useStyles = createUseStyles({
root: {
padding: '1em',
borderRadius: '0.2em',
background: '#f93',
color: '#fff',
textAlign: 'center',
cursor: 'pointer',
}
});