-
Notifications
You must be signed in to change notification settings - Fork 18
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
小于或者等于1像素的值不转换vw,需要如何配置 #7
Comments
这个功能我删掉了,因为小于 1 像素不转换其实是特定场景,也就是在使用边框的时候, 目前可以像下面这样,添加注释,不转换 1 像素: .box {
border: 1px solid black; /* mobile-ignore */
} 上面的是单行注释,也可以添加在属性的上面: .box {
/* mobile-ignore-next */
border: 1px solid black;
} 如果注释的意义和你想表达的不一样,也可以自定义注释名称,有两个选项可以设置注释名称, |
后面我想想加个什么其它属性来表示这种场景 |
使用 注释的形式 但 配置参数 |
好吧,之前没想到这个情况。目前有个 |
|
就是在设置边框的时候,比如
您的意思是不希望大于 1px 的变化吗?border 大于 1px 应该是要转的吧,一般 1px 的边框是分割作用,不用转,大于 1px 可能就是设计上的装饰作用了,需要转。如果你是希望所有的 border 都不转的话,可以用 propList 解决,比如 |
@ren2436 已添加选项 {
"valueBlackList": ["1px solid black"]
} 没有用 |
版本 |
如题所示,现在小于1像素也给转换了,导致显示太细,不美观,文档中也没找到如何解决这个问题
想实现 postcss-px-to-viewport 中的配置 minPixelValue 或者 在css 中添加注释 过滤的功能
还望能解决下,非常感谢
The text was updated successfully, but these errors were encountered: