Skip to content
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

[组件名称] 请将less变量替换为var 变量 #3347

Closed
lelouch-xue opened this issue Sep 30, 2024 · 4 comments
Closed

[组件名称] 请将less变量替换为var 变量 #3347

lelouch-xue opened this issue Sep 30, 2024 · 4 comments
Labels
need more info need more info wontfix This will not be worked on

Comments

@lelouch-xue
Copy link

这个功能解决了什么问题

请将less变量替换为var 变量

你建议的方案是什么

请将less变量替换为var 变量

  1. 可以用多种预处理插件
  2. 全局(局部)修改样式时更为方便
Copy link
Contributor

👋 @lelouch-xue,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@uyarn
Copy link
Collaborator

uyarn commented Oct 3, 2024

是指哪里?

@uyarn uyarn added the need more info need more info label Oct 3, 2024
@lelouch-xue
Copy link
Author

image
以途中的button为例,将@btn-height-s 等 变为--btn-height-s 作为一个var是不是更好一些呢,我看现在主流的框架都变成var了, 浏览器兼容除了ie都支持的很好了

@uyarn
Copy link
Collaborator

uyarn commented Oct 16, 2024

了解了,但是1.0的版本暂时不会做这种变动了,因为有一些使用方已经基于less来覆盖样式,这种改动影响比较大;
现在其实也可以基于全局变量也是可以支持组件级别的覆盖的,利用就近原则进行单个组件的二次覆盖;

.t-button {
--td-brand-color: xx 
}

@uyarn uyarn added the wontfix This will not be worked on label Oct 18, 2024
@uyarn uyarn closed this as completed Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info need more info wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants