【发布时间】:2021-07-16 00:11:37
【问题描述】:
我们是否应该在 React / Next.js 应用程序中也使用内联 CSS 样式来统一两个项目之间的代码?
像这样?
import {StyleSheet, Dimensions} from 'react-native';
const vw = Dimensions.get('window').width / 100;
export const styles = StyleSheet.create({
container: {
paddingTop: 0,
width: '100%',
marginTop: 0,
marginBottom: 0,
marginLeft: 'auto',
marginRight: 'auto',
fontFamily: 'Rubik',
},
tableSection: {
width: '100%',
marginBottom: 0,
fontFamily: 'Rubik-Bold',
},
...
而不是:
.eventOptionTitle {
word-wrap: break-word;
text-overflow: ellipsis;
}
.starList {
list-style-type: none;
padding-left: 0;
}
【问题讨论】:
标签: css reactjs react-native next.js shared-libraries