You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 24, 2024. It is now read-only.
After several hours investigating why this is happening, I can see that mapbox generates a mapbox-address-autofill shadow root which imparts a css style of
* { box-sizing: border-box !important; }
on everything - including my MUI input!.
This is going to break MUI's internal calculation of input height and is just all-around bad practice and not being good to your users.
Worse, the solution to this is not straightforward since !important flags cannot be passed to style blocks in MUI. That's why you don't use !important on stuff with wide css specifiers!!!
I am using the
AddressAutofillcomponent from@mapbox/search-js-reactand am using material ui for my input. When using them in conjunctionI get a nasty alignment error
After several hours investigating why this is happening, I can see that mapbox generates a
mapbox-address-autofillshadow root which imparts a css style ofon everything - including my MUI input!.
This is going to break MUI's internal calculation of input height and is just all-around bad practice and not being good to your users.
Worse, the solution to this is not straightforward since
!importantflags cannot be passed to style blocks in MUI. That's why you don't use!importanton stuff with wide css specifiers!!!