CSS Modules 'composes' Does Not Display Unknown Property in VSCode and Does Not Enable

Asked 2 years ago, Updated 2 years ago, 82 views

I'm studying building a website with a certain textbook.
Even if you write 'composes' as the title says,
"Unknown property: 'compos' css(unknownProperties)" appears.

I get the same error when I read the code of the finished version of the textbook. I am wondering if there is a problem with the VSCode configuration.

Even if you search on an overseas site, you can only get answers like registering so that the word 'composes' itself doesn't get errors...
Are there any extensions that make 'compositions' recognizable?

I would appreciate it if someone could help me.

Below is the code we are currently describing.

/* Side-by-side (basic)*/

.sideBySide{
  display:flex;
  flex-direction:column;
}

@media(min-width:768px){
  .sideBySide{
    flex-direction:row;
    justify-content:space-between;
  }
}

/* Side-by-side (center alignment)*/

.sideBySideCenter{
  compositions —sideBySide;
  align-items:center;
  text-align:center;
}

@media(min-width:768px){
  .sideBySideCenter{
    text-align:left;
  }
}

8/20 11:00 Add
In CSS Modules, composes: seems to capture the style of the previous class name and can be used as a +α style for the new class name.

PostCSS wrote npmls in the terminal and checked, but it was not installed (I'm sorry if this method is not correct)

css vscode

2022-09-29 21:35

1 Answers

I was reading that book and ran into the same problem.
Changed Visual Studio Code settings resolved.

Details and workarounds can be found in Github's wiki below.Please confirm.
https://github.com/ebisucom/next-react-website/wiki


2022-09-29 21:35

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.