tailwindcss icon indicating copy to clipboard operation
tailwindcss copied to clipboard

Empty Selector Generated in Tailwind CSS Output

Open amjarmed opened this issue 3 months ago • 4 comments

I encountered an issue where Tailwind CSS generates an invalid empty selector { } in the compiled CSS, causing errors during parsing.


Parsing css source code failed
  839 |   border-width: 1px;
  840 | }
> 841 |  {
      |   ^
  842 |   border-bottom-width: 1px !important;
  843 | }
  844 | .border-b {

Invalid empty selector at


What version of Tailwind CSS are you using?

  • "tailwindcss": "^3.4.14",

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

  • "next": "15.0.1",

What browser are you using?

  • Chrome

What operating system are you using?

  • Windows

Reproduction URL

https://github.com/amjarmed/jsm-banking

Describe your issue Tailwind CSS should not generate any empty selectors. All rules should be associated with a valid class or selector. A selector {border-bottom-width: 1px !important; } is generated without a class name, leading to parsing failures during build or runtime.

amjarmed avatar Nov 16 '24 14:11 amjarmed