CSS class not found (editor warning) - but class rule is defined and present
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.

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
Unfortunately I can't reprduce with this piece of code:
<!DOCTYPE html>
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
.test {
color: green;
}
</style>
</head>
<body>
<div class="test">TODO write content</div>
</body>
</html>
Is it possible that you can share your exact example please?
On 2022-10-03 4:44 am, Chrizzly wrote:
Unfortunately I can't reprduce with this piece of code:
TODO supply a title TODO write contentIs it possible that you can share your exact example please?
-- Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. You are receiving this because you authored the thread.Message ID: @.***>
Chrizzly,
This is an elusive bug.
This morning: I loaded your code in a new html file and no warning.
By day: Fooled around adding and modifying code blocks (with warnings when in other files) to introduce warning in your file and no warning. Note: my other files still showed warning all the while.
Tonight: Reloaded your code into another new file and warning! Note: Computer was on all day and NetBeans 15 was loaded and running.
See images of your code captured tonight. Note: Had to take picture of warning message. Otherwise, it disappears when focus is lost upon activating my snipping tool.
This seems a real bug but not a showstopper for me. I hope to provide solid clues as I carry on with coding. So would like to keep the issue open.
Best Regards,
Brian H. Combes President / Chief Engineer Tarp Tie Down Company Email: @.*** Phone/Text: 303-919-2307
Links:
[1] https://github.com/apache/netbeans/issues/4712#issuecomment-1265258186 [2] https://github.com/notifications/unsubscribe-auth/AFCTXGWEGBIRQ5HJRW5OGH3WBK2KBANCNFSM6AAAAAAQ2RX3YM
Sometimes it is also about placing the html file in a different folder which is not the public_html folder which NetBeans creates. I encountered such bugs to, years ago. So please, if somehow possible, just share your, what you think broken html project with us so wie can check some more things out.
Thanks 😎