CSS预处理
- 0
#讨论区
00条评论
实时对话
loading...
将css解析成AST,由插件提供能力,
常用插件
browserslist
指定的目标浏览器将一些 CSS 的新特性转换为目标浏览器所支持的语法。node-sass安装困难,可用dart-sass代替
jsx
const Button = styled.a`
/* This renders the buttons above... Edit me! */
display: inline-block;
border-radius: 3px;
padding: 0.5rem 0;
margin: 0.5rem 1rem;
width: 11rem;
background: transparent;
color: white;
border: 2px solid white;
/* The GitHub button is a primary button
* edit this to target it specifically! */
${props => props.primary && css`
background: white;
color: black;
`}
`