This commit is contained in:
Jeremy Schomery 2017-03-06 16:23:45 +03:30
parent 17e1b3f658
commit 277a180cd0

View File

@ -40,9 +40,9 @@ CodeMirror.registerHelper("lint", "css", function(text) {
if (message.message.indexOf('unicode-range') !== -1) { if (message.message.indexOf('unicode-range') !== -1) {
continue; continue;
} }
else if ( // color: hsl(210, 100%, 2.2%); else if ( // color: hsl(210, 100%, 2.2%); or color: hsla(210, 100%, 2.2%, 0.3);
message.message.startsWith('Expected (<color>) but found \'hsl') && message.message.startsWith('Expected (<color>) but found \'hsl') &&
/hsl\((\d+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\)/.test(message.message) /hsla?\(\s*(-?\d+)%?\s*,\s*(-?\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%(\s*,\s*(-?\d+|-?\d*.\d+))?\s*\)/.test(message.message)
) { ) {
continue; continue;
} }