Possible bug on complex CSS selector?

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
TomHTML
Rank II - Novice
Rank II - Novice
Posts: 28
Joined: Sun Feb 04, 2018 10:19 am

Possible bug on complex CSS selector?

Post by TomHTML » Thu Oct 11, 2018 12:30 am

The validator complains that this CSS selector is invalid, yet the W3 HTML and CSS checkers approve it (and it works for styling my elements):

Code: Select all

.block .block-content a[href*="//"][target*="_blank"]:not(.image-overlay):not([href*="example.com"])::after
It complains about *="example.com", stating:
There should be a valid attribute selector ([att=value]), class selector (.class), ID selector (#id), or psuedo-class (:class) here.
But this is what I need, and it does work: I'm excluding elements with an href containing "example.com" anywhere in the href string. Is there a preferred way to do this that is different than this formulation, or is this a bug? (I have version 18.0300).

Many thanks,
Tom

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3362
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Possible bug on complex CSS selector?

Post by Albert Wiersch » Thu Oct 11, 2018 9:36 am

Hi Tom,

Yes, sorry. It is a bug. I first discovered it while developing CSS HTML Validator 2019. I've back-ported a fix to the current download of CSS HTML Validator Standard 2018.

If you download CSS HTML Validator Standard 2018 then you should get v18.0331 or above. The system's update check won't detect this update yet but you should get the update if you download it here:
https://www.htmlvalidator.com/download/ ... ionin=1801

Please let me know if that fixes the problem.
Image
Albert Wiersch

TomHTML
Rank II - Novice
Rank II - Novice
Posts: 28
Joined: Sun Feb 04, 2018 10:19 am

Re: Possible bug on complex CSS selector?

Post by TomHTML » Thu Oct 11, 2018 9:44 am

Thanks! I've installed and run it, and the bug seems to be patched! Many thanks!

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3362
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Possible bug on complex CSS selector?

Post by Albert Wiersch » Thu Oct 11, 2018 10:09 am

Great! And you're very welcome!
Image
Albert Wiersch

Post Reply