question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Shadow from modal inherited on inputs inside that modal

See original GitHub issue

What version of Tailwind CSS are you using?

2.2.6

What build tool (or framework if it abstracts the build tool) are you using?

vue-cli

What version of Node.js are you using?

latest

What browser are you using?

Chromium

What operating system are you using?

Fedora

Describe your issue

Everything work fine but after the latest release things got weir all over our project. We have pretty standard installation of Tailwind and CSS so I thought I should report this.

We had to go back to 2.2.4 so the problem might be already at 2.2.5

This is what’s happening:

Screenshot from 2021-07-22 13-12-09

When I focus on element in modal it suddenly inherits a shadow-xl style. Which is on parent modal. It’s pretty weird.

Screenshot from 2021-07-22 13-12-09 (1)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
adamwathancommented, Jul 23, 2021

Hey! Any reason you deleted the reproduction field rather than providing one? That makes it extremely hard for me to be able to help.

Even just showing me the HTML for the modal and the input would help, but half of the classes on the input are cut off in the screenshot. Please help me out even a tiny bit here 🙃

0reactions
mxljecommented, Aug 10, 2021

Hi, I have the same problem and have reproduced it with v2.2.6 here: https://codepen.io/mxlje/pen/KKmbRGZ

Remove the shadow-xl class from the wrapper and you can see that the input no longer has a shadow when focused.

While it seems fixed in v2.2.7, the underlying issue actually comes from tailwind-forms. As you can see in the example, the input itself doesn’t have any classes applied except for the default styles that come from tailwind-forms.

The example was created with tailwind v2.2.6 and tailwind-forms v0.3.3.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap Modal sitting behind backdrop - Stack Overflow
The reason the backdrop comes above your modal is id the parent has any position set. A very simple way to solve the...
Read more >
4 reasons your z-index isn't working (and how to fix it)
Because the modal is inside the content element, its z-index of 100 only has an effect inside its parent, the content element.
Read more >
box-shadow - CSS: Cascading Style Sheets - MDN Web Docs
The box-shadow property enables you to cast a drop shadow from the frame of almost any element. If a border-radius is specified on...
Read more >
How To Use Opacity and Transparency to Create a Modal in ...
You will create a modal that appears with a no-JavaScript approach using the :target pseudo class and the opacity , pointer-events , and ......
Read more >
Getting Deep Into Shadows | CSS-Tricks
The modal has an underlying black shadow against ... property is the only property that can create inner shadows for a sunken effect....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found