CSS Validation of Custom CSS Properties

Oxygen general issues.
SixForty
Posts: 11
Joined: Sun May 09, 2021 7:34 am

CSS Validation of Custom CSS Properties

Post by SixForty »

When editing a CSS file, it seems that I get an error when trying to use a custom CSS property inside a color function. Custom properties appear to be validating fine elsewhere, but the following produces a validation error:

Code: Select all

background-color: hsl(0, 75%, var(--DarkTheme));
It gives the following error message:

"Invalid RGB function : )
Context: body in property: background-color"

This CSS construct displays properly in the browser, and works as expected in the end product. Can anyone tell me why the CSS validator in OxygenXML would give this error?

For the record, I am using XML Editor 24.1, build 2022030807, and I have the CSS Validator Preferences set to "Profile: CSS 3 with Oxygen Extensions"
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: CSS Validation of Custom CSS Properties

Post by Radu »

Hi,

I suspect the CSS Validator used in Oxygen needs to be updated as the W3C CSS validator service seems to be able to properly validate such constructs.
I added an internal issue based on your request:

EXM-51680 Validation error when using var functions in CSS

and we'll update this forum thread when an Oxygen version which supports such constructs will be released.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
SixForty
Posts: 11
Joined: Sun May 09, 2021 7:34 am

Re: CSS Validation of Custom CSS Properties

Post by SixForty »

Thanks Radu, I appreciate the help!

If you need any further configuration information on my end, or if you need my help reproducing the issue while you are error testing this, just let me know and I'm happy to help out.
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: CSS Validation of Custom CSS Properties

Post by Radu »

Hi,
As an update Oxygen 25.1 which we just released should have a fix for this problem.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply