Skip to main content
PaoloDellaB
Inspiring
March 14, 2025
Answered

:has psudo-class syntax detected as error

  • March 14, 2025
  • 3 replies
  • 329 views

I have added the following rule in my CSS file:

.wpb-content-wrapper:has(.firmaPost) {
	width: 100%;
	max-width: 600px;
}

The first line gets highlighted in red and this error is detected by DW:

Exptected RPAREN at line...

However, according to W3 Schools, the syntax is correct.

Why is the error shown?

Correct answer Jon Fritz

It's a bug, and it has been ignored for years by Adobe.

In external stylesheets, all kinds of more advanced CSS methods are flagged by DW as errors, within a <style> tagset, inside an html page though, it's not. That's probably why Nancy wasn't able to reproduce it. It immediately shows as an error in a .css file for me and DW's perfectly content with it in an html page.

When in doubt, use the css validator here: https://jigsaw.w3.org/css-validator/ 

With DW being moved out of active development in 2020-21, the liklihood they'll ever fix it is very low.

3 replies

Jon Fritz
Community Expert
Jon FritzCommunity ExpertCorrect answer
Community Expert
March 17, 2025

It's a bug, and it has been ignored for years by Adobe.

In external stylesheets, all kinds of more advanced CSS methods are flagged by DW as errors, within a <style> tagset, inside an html page though, it's not. That's probably why Nancy wasn't able to reproduce it. It immediately shows as an error in a .css file for me and DW's perfectly content with it in an html page.

When in doubt, use the css validator here: https://jigsaw.w3.org/css-validator/ 

With DW being moved out of active development in 2020-21, the liklihood they'll ever fix it is very low.

BenPleysier
Community Expert
Community Expert
March 17, 2025

Maybe Dreamweaver is out of date.

 

I would ignore the error in Dreamweaver and while you are at it, start using VSCode.

 

 

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Nancy OShea
Community Expert
Community Expert
March 14, 2025

I can't reproduce it at my end.

Maybe your document contains other code errors.

CSS Validation Service https://jigsaw.w3.org/css-validator/

HTML Validation Service https://validator.w3.org/

 

Nancy O'Shea— Product User & Community Expert
PaoloDellaB
Inspiring
March 17, 2025

Hi, if I comment that rule out no other error is reported so I have no idea.

The code works so it is not a real issue but strange anyway.