Comments (6)
@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.
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.
@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.
@jaywhy you were right! Thanks!
from tailwindcss-stimulus-components.
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:
When I remove the line from tailwind config, this blocking layer is gone (but the original issue is back):
from tailwindcss-stimulus-components.
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)
- Permit use Turbo frame on tabs click -Possible solution- HOT 3
- Multiple modals HOT 1
- How to utlize `cb`?
- https://registry.yarnpkg.com/tailwindcss-stimulus-components~: Not found HOT 1
- - delete this is just an error
- Tabs not working with the select / dropdown HOT 1
- Navigable Tabs with Keyboard HOT 1
- New release? HOT 4
- Active tabs styling is broken in version 4 HOT 2
- Modal forced to the hidden state when added to the DOM HOT 4
- Specify prefix for tailwind classes HOT 2
- Issue when using `data-tabs-update-anchor-value="true"` and linking to a specific anchor from another page HOT 1
- Dropdown improvements HOT 4
- Google Chrome Autofill Result Select Causes Modal Close HOT 3
- Multiple modals on a page -- components not properly behind background HOT 1
- Uncaught (in promise) DOMException: The user aborted a request. HOT 1
- CDN Minified version does not appear to respect `data-toggle-class` for toggle HOT 2
- Toggle feature cannot have multiple divs to have different status
- new release
- Dropdown transition are not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tailwindcss-stimulus-components.