-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
[ButtonGroup] Fix style to use last-child
#32424
Conversation
last-child
I checked the ci, and I don't quite understand why this fails, it seems that it has nothing to do with my modification 😅 |
Can we add regression tests for the examples that fails, for example using |
IMO the better way to go here would be to implement the change mentioned in #29514. This way, each element of the group will be aware of the position it has and will be able to be styled appropriately. |
last-of-type
orfirst-of-type
will look up different elements as two queues, so the style will be invalidated when customizing thebutton
componentI looked at the information emotion-js/emotion#1178 (comment) emotion-js/emotion#1105
last-child
should be safeI'm not sure if accept situation, if sure, please let me know if I need to add a test case Thanks! 🤔
demo: https://codesandbox.io/s/suspicious-mopsa-o1bqtu?file=/index.html
Fixes [ButtonGroup] Breaking when adding href to Button #31210 and ButtonGroup styling breaks when Button components differ in v5 #29224
I have followed (at least) the PR section of the contributing guide.