Skip to content

Tailwind Generates Invalid Styles #12288

Closed
@justingolden21

Description

@justingolden21

What version of Tailwind CSS are you using?

3.3.3

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

postcss 8.4.4

What version of Node.js are you using?

18.14.4

What browser are you using?

N/A

What operating system are you using?

Windows

Reproduction URL

https://play.tailwindcss.com/LOOZi6FfKB

This URL has the same styles as our project, but in tailwind play, it generates correct styles. In our project, tailwind generates invalid styles that have css rulesets without selectors. See below.

Describe your issue

Tailwind generates styles that are invalid, such as

 {
  font-size: 4.875rem;
}

which doesn't have a selector.

See full code in comment below.

I had believed this to be an issue with postcss originally and opened a ticket, but it was closed and I was told it's a problem with tailwind. postcss/postcss#1893

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions