mizi-lin / hulujs

hulujs
MIT License
0 stars 0 forks source link

feat: Met 伪类方案 #6

Open mizi-lin opened 1 year ago

mizi-lin commented 1 year ago
/** convert a style object to a CSS class name */
const niceColors = style({
  transition: 'color .2s',
  color: 'blue',
  $nest: {
    '&:hover': {
      color: 'red'
    }
  }
});

<h1 className={niceColors}>Hello world</h1>
image

https://typestyle.github.io/#/core

mizi-lin commented 1 year ago
<Met color='red' nest={{ 
    '&:hover': {
      color: 'red'
    }
}} />