Viijay-Kr/react-ts-css

Chained class selector does not work

Open

#179 建立於 2024年10月29日

在 GitHub 查看
 (2 留言) (2 反應) (1 負責人)TypeScript (6 fork)github user discovery
buggood first issuehelp wanted

倉庫指標

Star
 (66 star)
PR 合併指標
 (PR 指標待抓取)

描述

Describe the bug I have a chained selector of 2 classes. Those classes doesn't aren't recognized by the extension. Says Selector my-selector does not exist in css file. Also in css file it says Selector my-selector is declared but never used

To Reproduce Steps to reproduce the behavior:

  1. Put className on an element like this:
<ul className={`${styles['custom-list']} ${styles['info-wrapper']}`} >
  1. Write css in the css file like this:
.custom-list.info-wrapper {
  color: red;
}
  1. Hover on the className in react component
  2. See error Selector 'info-wrapper' does not exist in 'styles.module.css'
  3. Hover on the class in the css file
  4. See error Selector 'custom-list.info-wrapper' is declared but it's never used

Expected behavior It should show the css properties declared in the css file

Screenshots React Component and Output image

CSS File image

Desktop:

  • OS: Ubuntu
  • Version: 22.04.5 LTS x86_64

貢獻者指南