Improved Tailwind Config Docs #417
rishabkapadia
started this conversation in
General
Replies: 1 comment
-
|
Thanks, updated the readme. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Reason: To save time for those not well versed with tailwind config file.
By default, the modal view uses
2xlas mentioned in theModalComponent.phpfile undermodalMaxWidth()method.Also the docs mention to add the
sm:max-w-2xlin the safelist.But when I tried to return for eg.
4xlfrom themodalMaxWidth()in custom livewire component and add below code block to safelist it doesn't work.That is because the
ModalComponent.phpmapsxl,2xl, etc width to a list of classes which the user needs to add in the safelist. for eg. for4xl:sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xlBelow seems like a better alternative to cover all the class combinations to make it work for various modal sizes used in a project:
ref:
https://tailwindcss.com/docs/content-configuration#using-regular-expressions
Would be great if this code block could be added to the Docs instead of just mentioning
sm:max-w-2xlin the safelist.Beta Was this translation helpful? Give feedback.
All reactions