Skip to content
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

Fix modalWidthClass and add Exception #113

Merged
merged 1 commit into from Nov 14, 2021
Merged

Conversation

PhiloNL
Copy link
Contributor

@PhiloNL PhiloNL commented Nov 14, 2021

Make sure the class is applied and throw an exception if chosen width is undefined.

@PhiloNL PhiloNL merged commit b5786ea into main Nov 14, 2021
@PhiloNL PhiloNL deleted the bugfix/modal-width-class branch November 14, 2021 19:30
@Christophvh
Copy link

@PhiloNL This change made all our modals very small. Yet I still have 2xl in my config file. Does that mean i need to switch to 3xl and this was not working before or?

@PhiloNL
Copy link
Contributor Author

PhiloNL commented Jan 21, 2022

@Christophvh it might has to do with the whitelisting of the class, if you add these to your Tailwind config it should work as nothing has changed:

module.exports = {

    content: [
        './vendor/wire-elements/modal/**/*.blade.php',
    ],

    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"
    ],

};

@Christophvh
Copy link

Christophvh commented Jan 21, 2022

I already had the one we use which is the default here. I tried with all these but the same result. I also found this PR that seems to change how max-width works but we only published the config file, not the stylesheets. #111

The only thing that works is changing the default to 3xl instead of 2xl which seems strange.

@PhiloNL
Copy link
Contributor Author

PhiloNL commented Jan 21, 2022

Are you using the include_css option? Can you verify the 2xl class has CSS applied when you inspect the modal with your browser developer tools? Also, which version of Tailwind are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants