-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
Tabs indicator wrong position & width when using transform:scale. #35631
Comments
You need to target the |
👋 Thanks for using MUI Core! We use GitHub issues exclusively as a bug and feature requests tracker, however, For support, please check out https://mui.com/getting-started/support/. Thanks! If you have a question on Stack Overflow, you are welcome to link to it here, it might help others. |
@ZeeshanTamboli You removed the scaled div, of course it'll work when you remove the parent scale. |
@madmonliadd Sorry for that, I didn't read carefully about you saying I don't know why you want to achieve scaling for your use case, but you can increase the scaling by directly applying the styles to the AppBar. Having a unnecessary div in between for scaling is causing the issue of moving the position of the tab indicator. As for the width, it is calculated dynamically under the hood according to the size of the tab and considers various other factors, but you can override it with the See the updated CodeSandbox: https://codesandbox.io/s/usage-forked-1y7g9f?file=/index.js I would suggest to use StackOverflow for these type of questions. I hope it helps. |
@ZeeshanTamboli Hey, thanks for your help, I tried stack overflow without success, it's a bug, not a help request. |
It's not a bug. It's just about overriding with the correct styles. You have to simply find a way to style the tab indicator properly. Maybe you want to check if you are correctly using |
In case someone else lands here.
|
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example:
https://codesandbox.io/s/usage-forked-gw74rl?file=/index.js
Steps:
Current behavior 😯
The tabs' indicator's position & width isn't correctly set.
Expected behavior 🤔
The tabs' indicator's position should be exactly below the selected tab, and its width should match exactly the selected tab's width.
Context 🔦
No response
Your environment 🌎
Using the codesandbox above.
The text was updated successfully, but these errors were encountered: