Skip to content

Incorrect linting on canonical classes using square brackets to target data attributes #1487

@juanpablob

Description

@juanpablob

Thanks for maintaining this plugin, appreciated! 💜

My bug reports is related to: #1476

What version of VS Code are you using?
1.99.3

What version of Tailwind CSS IntelliSense are you using?
0.14.28

What version of Tailwind CSS are you using?
4.1.11

What package manager are you using?
pnpm

What operating system are you using?
MacOS


Describe your issue

The plugin is wrongly linting classes with brackets targeting data attributes. For instance, if I write this:

<div className={cn(`'has-[[data-layout-y="fixed"]]:h-svh',`)} />

it complains saying:

The class has-[[data-layout-y="fixed"]]:h-svh can be written as has-data-[layout-y="fixed"]:h-svh(suggestCanonicalClasses)

which is not correct, it won't work with single brackets.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions