-
Notifications
You must be signed in to change notification settings - Fork 622
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
样式问题汇总 #1392
Labels
Comments
按规则 rem 不参与计算 |
1.0 rem 已经是对齐 web 标准了,不会按 750 计算 |
|
.container {
.title {
color: red;
}
} <View className="container">
<View className="title"></View>
</View> 是否考虑在静态分析层面实现这种父子组合选择器,这块目前的书写体验和 Web 的差距比较大 |
与纯 web 样式对标使用方式工程插件版本
build.json 配置开启不转成行内样式开关 {
"inlineStyle": false,
"plugins": [
["rax-plugin-app", { "targets": ["web"] }]
]
}
样式使用示例 import {createElement, useState} from 'rax';
import View from 'rax-view';
import './index.css';
import style from './inline.js';
export default (props) => {
return (
<View className={'list'}>
<div className={'item red'}> Hello List</div>
<View className={'item'}>item1</View>
<View className={'item green'}>item2 (className item & green)</View>
<View className={'item'}>item3</View>
<View id="yellow" className={'item'}>item4 (id is yellow)</View>
<View className={'item'}>item5</View>
<p className={'item'}>item6 (this is p)</p>
<View style={style.inlineItem}>item7 (inline style)</View>
</View>
);
}; 样式示例 body {
padding: 0;
margin: 0;
}
.list {
background-color: #efefef;
padding: 10px;
}
.item {
background-color: blue;
margin-bottom: 5px;
padding: 5px;
color: #fff;
}
.list .green {
background-color: green;
}
.red {
background-color: red;
}
#yellow {
background-color: yellow;
color: #333;
}
p {
margin: 0;
padding: 5px;
background-color: #333 !important;
color: #fff !important;
} |
已和需求方验收确认 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Help us to manage our issues by answering the following:
style
引用外部样式文件中的类,不生效,会报相应的错误信息.
The text was updated successfully, but these errors were encountered: