-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
borderTopStyle/borderRightStyle/borderBottomStyle/borderLeftStyle在RN中的支持 #1849
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
CC @Pines-Cheng |
设置具体方向的border,可以这样写: border-width: 0 0 2px 0;
border-bottom-color: #dddddd;
border-style: solid; |
有办法在scss中判断当前环境的吗?例如同一个选择器,在RN中我用 border-style: solid; 在其他环境用 border-right-style: solid; |
这个能满足你需求吗:
/*postcss-pxtransform rn eject enable*/
.test {
color: black;
}
/*postcss-pxtransform rn eject disable*/ |
我觉得可行。如果方便的话,其他端最好也有这种注释,如支付宝和头条 |
问题描述
在RN中使用 border-bottom: 1px solid #fff; 会报错,因为RN的StyleSheet不支持这种写法。
另外阅读文档,发现RN的border只支持borderStyle,不支持具体方向分别设置。
在看taro-ui源码时得知scss是可以使用
@if
这种表达式的。所以是否能在scss中注入类似 process.env.TARO_ENV 的变量?这样就可以让开发者在scss中做简单的控制。系统信息
Taro CLI 1.2.4 environment info:
System:
OS: macOS 10.14.2
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.11.0 - /usr/local/bin/node
Yarn: 1.3.2 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
npmGlobalPackages:
typescript: 2.4.2
The text was updated successfully, but these errors were encountered: