apache / apache/netbeans

CSS class not found (editor warning) - but class rule is defined and present

Open
#4,712 4 comments 0 reactions 0 assignees View on GitHub
CSS hints HTML kind:bug needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 15

### What happened

Get warnings about CSS "class not found" when building and editing HTML files.

This warning shows with both local rule definition in the header or imported from separate CSS style sheet file.

Able to turn off in the HTML Language (Hints) settings but purpose of this feature is than defeated.

Should not get warning except when CSS class is actually not there.

![Screenshot 2022-10-01 120720](https://user-images.githubusercontent.com/21314458/193422835-3b3060d9-0d7d-4bac-9b03-612225cdaa00.jpg)
![Screenshot 2022-10-01 121328](https://user-images.githubusercontent.com/21314458/193422837-38dfd90b-6249-40c1-a319-97e54b391c7b.jpg)
![Screenshot 2022-10-01 121658](https://user-images.githubusercontent.com/21314458/193422838-69952d7e-8c44-43ac-a2d9-1c5293b5d500.jpg)

### How to reproduce

Write an HTML element with a CSS class reference, include the CSS rule in the style element of the header. Warning should go away but editor says it can't find said class.

In this case, it says "Class dropdown not found"

### Did this work correctly in an earlier version?

No / Don't know

### Operating System

Windows 11 Pro - Ver 21H2

### JDK

jdk-18.0.1.1

### Apache NetBeans packaging

Apache NetBeans provided installer

### Anything else

Happens all the while, all the time.

No time to do a pull request for this one but have another issue involving GIT for later.

### Are you willing to submit a pull request?

No

### Code of Conduct

Yes

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the warning in the HTML editor with a class defined in a header style element and then inspect the HTML Language hints responsible for CSS class validation. The issue names no source files or tests; done means the warning disappears for locally defined and imported classes while remaining for genuinely missing classes.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.