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

disabled Button with Tooltip has a span wrapper, which affects css selector #22453

Closed
1 task done
rinick opened this issue Mar 20, 2020 · 7 comments · Fixed by #22461
Closed
1 task done

disabled Button with Tooltip has a span wrapper, which affects css selector #22453

rinick opened this issue Mar 20, 2020 · 7 comments · Fixed by #22461

Comments

@rinick
Copy link
Contributor

rinick commented Mar 20, 2020

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

Reproduction link

Edit on CodeSandbox

Steps to reproduce

buttons are not aligned

What is expected?

.group > .ant-btn {
margin-top: 4px;
}

What is actually happening?

the disabled button is wrapped by a span, which makes it hard to apply css selector

Environment Info
antd 4.0.3
React 16.8.6
System windows 10
Browser chrome 80
@rinick
Copy link
Contributor Author

rinick commented Mar 20, 2020

changing selector to .group .ant-btn would work, but it means developers need to be aware of this behavior when writing css. Also there might be some use cases people really need to use > selector

@afc163
Copy link
Member

afc163 commented Mar 20, 2020

#21404 (comment)

@afc163
Copy link
Member

afc163 commented Mar 20, 2020

#18842 (comment)

@afc163 afc163 closed this as completed Mar 20, 2020
@rinick
Copy link
Contributor Author

rinick commented Mar 20, 2020

@afc163 can we give that wrapper span a css className so when I really need to use the > selector, there is still a way to select it

.group > .ant-btn, .group > .ant-btn-tooltip-wrapper {
 ....
}

@afc163 afc163 reopened this Mar 21, 2020
@afc163
Copy link
Member

afc163 commented Mar 21, 2020

We should fix the align issue.

@afc163
Copy link
Member

afc163 commented Mar 21, 2020

can we give that wrapper span a css className

sure, how about .ant-tooltip-wrapper-for-disabled?

@rinick
Copy link
Contributor Author

rinick commented Mar 21, 2020

can we give that wrapper span a css className

sure, how about .ant-tooltip-wrapper-for-disabled?

yep, that works for me

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

Successfully merging a pull request may close this issue.

2 participants