From a8fe66550b76e574fb635534dc9ebeebc019d2a4 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 30 May 2020 06:33:29 +0300 Subject: [PATCH] Fixes for csslint parserlib (#947) * css parser: vars in @supports(--var: foo) * css parser: @keyframes inside @supports and @media --- vendor-overwrites/csslint/parserlib.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vendor-overwrites/csslint/parserlib.js b/vendor-overwrites/csslint/parserlib.js index da4095ca..306dbaae 100644 --- a/vendor-overwrites/csslint/parserlib.js +++ b/vendor-overwrites/csslint/parserlib.js @@ -4017,7 +4017,7 @@ self.parserlib = (() => { const stream = this._tokenStream; if (stream.match(Tokens.LPAREN)) { this._ws(); - if (stream.match(Tokens.IDENT)) { + if (stream.match([Tokens.IDENT, Tokens.CUSTOM_PROP])) { // look ahead for not keyword, // if not given, continue with declaration condition. const ident = lower(stream._token.value); @@ -5421,6 +5421,7 @@ self.parserlib = (() => { ]), supports: new Map([ + [Tokens.KEYFRAMES_SYM, Parser.prototype._keyframes], [Tokens.MEDIA_SYM, Parser.prototype._media], [Tokens.SUPPORTS_SYM, Parser.prototype._supports], [Tokens.DOCUMENT_SYM, Parser.prototype._documentMisplaced], @@ -5428,6 +5429,7 @@ self.parserlib = (() => { ]), media: new Map([ + [Tokens.KEYFRAMES_SYM, Parser.prototype._keyframes], [Tokens.MEDIA_SYM, Parser.prototype._media], [Tokens.DOCUMENT_SYM, Parser.prototype._documentMisplaced], [Tokens.SUPPORTS_SYM, Parser.prototype._supports],