gpt4 book ai didi

css - 我正在将现有的 SCSS 代码转换为 JSS,我坚持转换以下嵌套类

转载 作者:行者123 更新时间:2023-11-28 03:07:04 25 4
gpt4 key购买 nike

我在下面附加了 SCSS 和 React 元素的代码

.chatPane {
height: 100%;
overflow: hidden;

.form-control, .form-control:focus, .form-control:active {
border-bottom: 0;
}
}
render() {
const { isLoaded, messages, handleSendMessage, user } = this.props;
const dialogChildren = (
<div className="modalBox">
<h1 className="modalBox-header">Join chat</h1>
<form onSubmit={this.onCreateUser}>
<input className="modalBox-input" placeholder="Type your name" onChange={this.onNameChange} />
<hr className="modalBox-horizontal"/>
<div className="modalFooter">
<Link className="modalBox-link" to="/chat">close</Link>
<button className="modalBox-button" onClick={this.onCreateUser} type="submit">join</button>
</div>
</form>
</div>
);

我需要一些帮助将此代码转换为 JSS

最佳答案

您需要默认预设或特别是 jss 嵌套插件,它用父规则选择器替换 &。

{
a: {
'& .b, & .c:focus, & .d:focus': {
color: 'red'
}
}
}

关于css - 我正在将现有的 SCSS 代码转换为 JSS,我坚持转换以下嵌套类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45899587/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com