Jump to content

Recommended Posts

Posted (edited)

Jigsaw css validation reports 400+ errors in this nvision very own sites CSS

https://jigsaw.w3.org/css-validator/validator?uri=https%3A%2F%2Finvisioncommunity.com%2Fforums%2F&profile=css3svg&usermedium=all&warning=1&vextwarning=&lang=en

 

The majority of them are 'RGB function error's

eg

.ipsWidget_title Value Error : color Invalid RGB function )

 

what is the cause of these errors?

is it because invision is using hex values as the  variable in a rgb function?

eg

color:rgb( var(--theme-widget_title_font) );

as in should the above code be  

 

color: var(--theme-widget_title_font) ;
 

 

rather than rgb?

It does seem that in custom.css if you use the non-rgb version the error goes away 

Edited by sound
Posted

It's an issue with the validator. The var() call returns the three numbers, so it needs to be passed to the CSS rgb() call as is being done. With custom.css the vars are usually hex values, which is why they're not passed to rgb().

Posted
8 minutes ago, bfarber said:

It's an issue with the validator. The var() call returns the three numbers, so it needs to be passed to the CSS rgb() call as is being done. With custom.css the vars are usually hex values, which is why they're not passed to rgb().

thanks for the reply

though I may be missing something here

as all the theme variables in my core_theme_settings_values table are actually stored as hex not rgb

 

var(--theme-widget_title_font) 

so doesn't this call always return the same result - a hex one in my case

as said apologies if missing something obvious

 

 

 

 

 

Posted

Here's the CSS file for this site

f youimage.png

If you're seeing an issue please let us know, but I believe the validator you're referring to simply isn't accounting for CSS variables inside the rgb() CSS function.

Posted

thanks for looking into this, I don't really get why the rgb function is being used if the actual variables are stored as hex

would the conversion have some performance hit? , and maybe there be no errors in the validation, if it wasn't

but as am a bit out my depth here I will leave this here

thanks again for the effort/time in replying

 

 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...