Open armanal opened 1 year ago
have u tried this !min-w-0
? this make the class is !important
so can override the default material tailwind className.
yes. I have tried using !min-w-0
and somehow the browser (chrome for example) keeps using default classes.
Here I have tried same thing with TextArea element. both classes appear to be applied when inspecting in the browser but the default one (min-w-[200px]
) is taking effect:
@JuanAntonioV use !min-w-0
work for me in Input
component!! Tks :D
min-w-[200px]
continues to appear in the tags, but it has been replaced in the component's styling as you can see below:
Note: it only works with !
, without important
it doesn't work
Hello,
well, when I do that, it doesn't include the min-width in the div; instead, it applies it to the input and causes the error.
And the result:
I was trying to give the Input element a min width of zero (
min-w-0
) where I found out that the default class (min-w-[200px]
) was not being removed. Since the browser keeps an element's classes in a set-like data structure, the order of appearance might not be kept. So this causes unpredictable behaviour.Then I realized in some of the components default classes were merged with user given ones using
twMerge
where dedupes and overrides classes effecting the same CSS. I would like to do the same thing for all other components toI'd like to work on a pull request that changes :
to :
in the
@material-tailwind/react
package.