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

Can Antd less module be import easier and clear without the global reset stylesheet effect? #12037

Closed
1 task
tun100 opened this issue Sep 3, 2018 · 2 comments
Closed
1 task
Assignees

Comments

@tun100
Copy link

tun100 commented Sep 3, 2018

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

Recently, I'm using the antd(v3.8.4) tree component for a JS plugin, the compile tools is parcel.
When I compiled(one css file, and one js file), after insert the resource into an old project which using old tools such as jquery, bootstrap, the total page UI is mixed and conflict.
After checking the less file, I found the conflict question is causing by antd lib less file(node_modules/antd/lib/style/core/base.less). After I removed the default global less import, and import less file which the minimal need and without base.less, the conflict UI question has be fixed, but I found seems like tree component horizontal direction is always scrolling.
After rechecking the base.less, I found because losing the base.less which define pseudo class ::after and ::before attribute box-sizing like 'border-box'.
Now question is fixing, but I wonder is there better way to exact a antd component into a separate component without global element css effect(such as input, ul, ol), and without any change and checking, what I just need to do is import this component and can easier insert it into another project which using different UI style.

What does the proposed API look like?

Easier Import Less, make CSS Module, Antd Style can be easier import. Sorry, seems like this feature cannot support a code snippet

@afc163
Copy link
Member

afc163 commented Sep 3, 2018

#4331
#9363
#11929

@afc163 afc163 closed this as completed Sep 3, 2018
@tun100
Copy link
Author

tun100 commented Sep 4, 2018

@afc163 Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants