ant-design / antd-style

css-in-js library with antd v5 token system
https://ant-design.github.io/antd-style/
MIT License
219 stars 35 forks source link

👑 className精准定位 #22

Closed vscing closed 1 year ago

vscing commented 1 year ago

🥰 需求描述

当我写完一个样式,我去dom节点查找的时候,无法精准的知道样式加在那个元素上了。全部都是class=“ant-css-XXXX”

arvinxx commented 1 year ago

这个需要 babel 插件配合,现在还没做,但这个功能我们之前是有规划的,正式版发布前会准备好

vscing commented 1 year ago

babel 插件 正式版本什么时候发布啊?

arvinxx commented 1 year ago

Beta半个月左右,rc再半个月左右。正式版差不多3月底

chj-damon commented 1 year ago

现在已经5月底了

arvinxx commented 1 year ago

计划赶不上变化🤣 正式版已经发了。而且还有了less转cssinjs 的codemod,但这个还没实现

arvinxx commented 1 year ago

@vscing @chj-damon 已支持,详见:https://ant-design.github.io/antd-style/guide/babel-plugin

wjf40390 commented 1 year ago

其实我想要的是样式加在哪个元素上了,例如下面的代码,希望className包含layout或者container字样这样更加容易区分,插件提供的className 将会定位到对应的样式文件目录感觉没太大用处。

image
chj-damon commented 1 year ago

目前babel插件确实看不出来是哪个样式。

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 3.4.0-alpha.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 3.4.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: