Skip to content

Abnormal css ouput when some string in the code is wrapped in square brackets #6395

@ltclmbdev

Description

@ltclmbdev

What version of Tailwind CSS are you using?

v3.0.1

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

Next.js 12.0.4, postcss 8.4.4

What version of Node.js are you using?

v14.18.1

What browser are you using?

Chrome

What operating system are you using?

macOS

Reproduction URL

https://github.com/DrShpongle/tailwindcss-3-issue-demo

Describe your issue

In case we use some text wrapped with square brackets we get abnormal css output:

Example 1:
Just an object with string field:
https://github.com/DrShpongle/tailwindcss-3-issue-demo/blob/main/components/problem-01.js#L4-L5
problem-01 js — with-tailwindcss-app 2021-12-11 at 1 36 31 PM

and related output:
https://github.com/DrShpongle/tailwindcss-3-issue-demo/blob/main/dist/output.css#L579-L581
output css — with-tailwindcss-app 2021-12-11 at 1 38 58 PM

Example 2:
Just regular dumb component:
https://github.com/DrShpongle/tailwindcss-3-issue-demo/blob/main/components/problem-02.tsx#L10
problem-02 tsx — with-tailwindcss-app 2021-12-11 at 1 42 50 PM

and related output:
https://github.com/DrShpongle/tailwindcss-3-issue-demo/blob/main/dist/output.css#L583-L585
output css — with-tailwindcss-app 2021-12-11 at 1 44 09 PM

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