Skip to content

In a CSS file in a class, @apply shows error in VSCode Vue 2 project, when more then 1 tailwind class is assigned #3561

Closed
@rowild

Description

@rowild

Describe the problem:

In a css file, a class is assigned tailwind styles using @apply:

.new-activity-show {
  @apply h-80 mt-8;
}

This causes VSCode to put wiggley lines under the 2 classes and signal problems:

semi-colon expected
{
"resource": "/[path]/components/NewActivity.vue",
"owner": "generated_diagnostic_collection_name#2",
"code": "css-semicolonexpected",
"severity": 8,
"message": "semi-colon expected",
"source": "css",
"startLineNumber": 371,
"startColumn": 15,
"endLineNumber": 371,
"endColumn": 19
}

at-rule or selector expected
{
"resource": "/[path]/components/NewActivity.vue",
"owner": "generated_diagnostic_collection_name#2",
"code": "css-ruleorselectorexpected",
"severity": 8,
"message": "at-rule or selector expected",
"source": "css",
"startLineNumber": 372,
"startColumn": 1,
"endLineNumber": 372,
"endColumn": 2

}

Tailwind Intellisense is installed, which I expected to handle tailwind lasses in Vue. Maybe I am wrong on this assumption?
Uninstalling it does not change anything.

I would expect that there are no error messages shown.

Link to a minimal reproduction:

Please try in VScode, because this cannot be show-cased on the playground or somewhere else.
A screenshot is included.

Thank you!

Screen Shot 2021-02-10 at 12 11 03

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