Giter Club home page Giter Club logo

Comments (6)

jaywhy avatar jaywhy commented on June 19, 2024 2

@rockwellll, I hit a similar issue today, but I believe your issue and mine are related to tailwind not picking up all the class names required by the modal component.

I think what is at issue is inset-x-0 not being compiled. I'm guessing the point of setting body to fixed is to get rid of scrollbars, but without inset-x-0, the content will shrink.

The fix is to add all or part of the component js files to the content sources.

module.exports = {
  content: [
    //...
    './node_modules/tailwindcss-stimulus-components/src/*.js'
  ]
}

Here is an example of the issue.

from tailwindcss-stimulus-components.

rockwellll avatar rockwellll commented on June 19, 2024 1

Hey @elalemanyo. Glad it helped you out.

No worries. I'm glad you turned in into a PR.

The changes you've made are outstanding. I like the fact you extracted the classes into a value so that it can be overriden easily.

Fantastic job!.

from tailwindcss-stimulus-components.

elalemanyo avatar elalemanyo commented on June 19, 2024

@rockwellll I was having the same issue, and your fix worked perfectly, thanks!
That's why I felt free to open a pull request, I hope you don't mind. If you can take a look at it and let me know what you think, would be great 🙂

Thanks!

from tailwindcss-stimulus-components.

elalemanyo avatar elalemanyo commented on June 19, 2024

@jaywhy you were right! Thanks!

from tailwindcss-stimulus-components.

SalvesTestservices avatar SalvesTestservices commented on June 19, 2024

When I apply the solution of @jaywhy it solves the issue, but then I get kind of dark gray layer on top of everything which also blocks the modal:

issue

When I remove the line from tailwind config, this blocking layer is gone (but the original issue is back):

issue2

from tailwindcss-stimulus-components.

HashNuke avatar HashNuke commented on June 19, 2024

Before attempting @jaywhy's solution , I fixed it by adding w-full class to the body. That would fix this issue.

But the solution that @jaywhy mentioned in his comment is the right way to fix this. (I can confirm that fixed the issue too).

If you are only using the modal component, make sure to only include the modal.js file in the tailwind config (like below).

module.exports = {
  content: [
    //...
    './node_modules/tailwindcss-stimulus-components/src/modal.js'
  ]
}

I think we can close this ticket.

from tailwindcss-stimulus-components.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.