Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New warning in Chrome through jQuery

Tags:

jquery

css

A new warning message suddenly appeared in Chrome developer tools (probably after an update) on a larger CSS+jQuery project of mine and I can't figure out what the problem might be:

The specified value '!' does not conform to the required format. The format is '#rrggbb' where rr, gg, bb are two-digit hexadecimal numbers.

I've checked everywhere and I'm not using any '!' when specifying colors.

I'm using jQuery 2.1.0 version.

like image 244
the-catalin Avatar asked Mar 12 '15 08:03

the-catalin


1 Answers

In my case this warning is caused by Spectrum.js , i tried to remove it from my project and the error no longer occurs, then i think it is just that. You also use this library in your project?

This is the relative issues : #291 #292

And this can do a fix : replace the "!" with "#ffffff" at line 75 of spectrum.js

inputTypeColorSupport = (function() { var colorInput = $("<input type='color' value='#ffffff' />")[0]; return colorInput.type === "color" && colorInput.value !== "#ffffff"; })(),
like image 185
WhiteLine Avatar answered Oct 23 '22 01:10

WhiteLine