modalMaxWidth() not working with tailwind 3. #157
Replies: 6 comments 11 replies
-
same problem it works only if you use <script src="https://cdn.tailwindcss.com"></script> but with classic laravel/tailiwnd install (https://tailwindcss.com/docs/guides/laravel) dosen't works I don't know the reason |
Beta Was this translation helpful? Give feedback.
-
Same problem, please share if you fix this. Thank you. |
Beta Was this translation helpful? Give feedback.
-
This is my tailwind config and it works fine with Tailwind 3: const defaultTheme = require('tailwindcss/defaultTheme');
module.exports = {
content: [
'./vendor/laravel/jetstream/**/*.blade.php',
'./vendor/wire-elements/modal/**/*.blade.php',
'./storage/framework/views/*.php',
'./resources/views/**/*.blade.php',
],
theme: {
extend: {
fontFamily: {
sans: ['Inter var', ...defaultTheme.fontFamily.sans],
},
},
},
safelist: [
"sm:max-w-sm",
"sm:max-w-md",
"sm:max-w-lg",
"sm:max-w-xl",
"sm:max-w-2xl",
"sm:max-w-3xl",
"sm:max-w-4xl",
"sm:max-w-5xl",
"sm:max-w-6xl",
"sm:max-w-7xl"
],
plugins: [require('@tailwindcss/forms'), require('@tailwindcss/typography'), require('@tailwindcss/aspect-ratio')],
}; |
Beta Was this translation helpful? Give feedback.
-
@PhiloNL I'm using jetstream and tried your config. I still can only get 28rem max width on my modals. Any ideas?
|
Beta Was this translation helpful? Give feedback.
-
You need to add content: [
'./vendor/wire-elements/modal/resources/views/*.blade.php',
'./vendor/wire-elements/modal/src/ModalComponent.php',
], because the regex is searching for css class names, but you define it in the php |
Beta Was this translation helpful? Give feedback.
-
work fine with me, here my tailwind.config.js
|
Beta Was this translation helpful? Give feedback.
-
Hello guys, i cannot change wire-elements modal width.
Im using "tailwindcss": "^3.0.16",
Few days ago i tried
safelist: [ "sm:max-w-sm", "sm:max-w-md", "sm:max-w-lg", "sm:max-w-xl", "sm:max-w-2xl", "sm:max-w-3xl", "sm:max-w-4xl", "sm:max-w-5xl", "sm:max-w-6xl", "sm:max-w-7xl", "md:max-w-lg", "md:max-w-xl", "lg:max-w-2xl", "lg:max-w-3xl", "xl:max-w-4xl", "xl:max-w-5xl", "2xl:max-w-6xl", "2xl:max-w-7xl'", ],
in my tailwind.config.js and it worked. Im not sure what did i changed then but it didnt work now. I have also tried this
safelist: [ { pattern: /max-w-(sm|md|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl)/, variants: ['sm', 'md', 'lg', 'xl', '2xl'], }, ],
but nothing changes. Please send help.Currently my config file is as such
`const defaultTheme = require('tailwindcss/defaultTheme');
module.exports = {
content: [
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/.blade.php',
'./vendor/laravel/jetstream/**/.blade.php',
'./storage/framework/views/.php',
// './resources/views/**/.blade.php',
],
darkMode: 'class',
theme: {
extend: {
fontFamily: {
sans: ['Nunito', ...defaultTheme.fontFamily.sans],
},
},
},
};
`
Beta Was this translation helpful? Give feedback.
All reactions