ant-design / antd-style

css-in-js library with antd v5 token system

Home Page:https://ant-design.github.io/antd-style/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🧐[问题]新手咨询下样式嵌套问题

ygxw opened this issue · comments

🧐 问题描述

请教大佬一个问题,之前一直用的less和scss,但现在升级antd后,想用新的cssinjs,不过有一种写法怎么改成antd-style的写法呢?

老的less写法如下:

.样式名称1 {
color:#000000;
background-color:#ffffff;
}
.样式名称1下面的一个子标题文字样式 {
color:rgba(0,0,0,.5);
}
.样式名称1选中样式 {
color:#ffffff;
background-color:blue;

.样式名称1下面的一个子标题文字样式 {
color:#ffffff;
}
}

想要的效果如下:
image

其实最主要就是以前“样式名称1选中样式”下面覆盖了一个“样式名称1下面的一个子标题文字样式”,这种写法怎么改?或者用什么思路?

新手请教,原谅我可能提的问题有点小白。

点赞,要的就是这个,谢谢大佬。