Apache NetBeans version
Apache NetBeans 27
What happened
The NetBeans CSS editor incorrectly identifies the dot (.) in class selectors within ::host() and ::slotted() pseudo-elements as a syntax error. The editor shows error indicators for valid CSS syntax that is part of the Shadow DOM specification.
Language / Project Type / NetBeans Component
No response
How to reproduce
- Open or create a CSS file in NetBeans
- Write CSS rules using class selectors within Shadow DOM pseudo-elements:
::host(.active) {
background-color: blue;
}
::slotted(.highlight) {
color: red;
}
::host(.disabled) {
opacity: 0.5;
}
- Observe that the editor shows syntax errors specifically at the dot (.) character
Did this work correctly in an earlier version?
No / Don't know
Operating System
Linux mint
JDK
openjdk 21
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
Technical Context:
::host(.class) targets the host element when it has the specified class
::slotted(.class) targets slotted elements with the specified class
Both are standard CSS Shadow DOM selectors supported by all modern browsers
The dot notation is the standard CSS class selector syntax
Reference:
CSS Scoping Module specification: https://www.w3.org/TR/css-scoping-1/
MDN ::host(): https://developer.mozilla.org/en-US/docs/Web/CSS/::host_function
MDN ::slotted(): https://developer.mozilla.org/en-US/docs/Web/CSS/::slotted
Impact:
False positive error reporting
Disrupts Web Component development workflow
Confuses developers working with modern CSS features
Are you willing to submit a pull request?
No
Apache NetBeans version
Apache NetBeans 27
What happened
The NetBeans CSS editor incorrectly identifies the dot (.) in class selectors within ::host() and ::slotted() pseudo-elements as a syntax error. The editor shows error indicators for valid CSS syntax that is part of the Shadow DOM specification.
Language / Project Type / NetBeans Component
No response
How to reproduce
::host(.active) {
background-color: blue;
}
::slotted(.highlight) {
color: red;
}
::host(.disabled) {
opacity: 0.5;
}
Did this work correctly in an earlier version?
No / Don't know
Operating System
Linux mint
JDK
openjdk 21
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
Technical Context:
::host(.class) targets the host element when it has the specified class
::slotted(.class) targets slotted elements with the specified class
Both are standard CSS Shadow DOM selectors supported by all modern browsers
The dot notation is the standard CSS class selector syntax
Reference:
CSS Scoping Module specification: https://www.w3.org/TR/css-scoping-1/
MDN ::host(): https://developer.mozilla.org/en-US/docs/Web/CSS/::host_function
MDN ::slotted(): https://developer.mozilla.org/en-US/docs/Web/CSS/::slotted
Impact:
False positive error reporting
Disrupts Web Component development workflow
Confuses developers working with modern CSS features
Are you willing to submit a pull request?
No