Selector is never used

Open
#110 8 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
css, javascript, kotlin

Research direction

Start by reproducing the example in WebStorm 2023.3.2 with the styled-components plugin version listed in the issue, focusing on the custom .some_class selector versus the h3 selector. Done means valid custom selectors in styled-components blocks are no longer reported as unused.

Written by the indexing model from the issue text.

Description

  • WebStorm 2023.3.2
  • Styled-components plugin version: 233.13135.92

Problem description:

I noticed a problem after updating to the latest version of Webstorm when I want to write the class some_class, for example, into the Wrapper wrapper. Webstorm shows that this class has never been used, but this is not true.

WebStorm highlights only regular tags in the style h1-h5, p, ul, etc.

const Wrapper = styled.div`
// h3 is highlighted by the editor
h3 {
color: #242628;
font-size: 20px;
font-weight: 700;
line-height: 140%;
}

     // Selector some_class is never used
.some_class {
	margin-top: 20px;
}

`

image

Dominant language
Kotlin
Stars
376
Forks
17
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from styled-components/webstorm-styled-components

All issues in styled-components/webstorm-styled-components

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.