Skip to content

Commit 74592d6

Browse files
committed
Update build/node-parserlib.js
MediaQuery mediaType and features needs to be joined trough "and". Not a big issue but window.matchMedia reports the MediaQuery .text as invalid 
1 parent 63fd3bf commit 74592d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/node-parserlib.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ MediaFeature.prototype.constructor = MediaFeature;
11691169
*/
11701170
function MediaQuery(modifier, mediaType, features, line, col){
11711171

1172-
SyntaxUnit.call(this, (modifier ? modifier + " ": "") + (mediaType ? mediaType + " " : "") + features.join(" and "), line, col, Parser.MEDIA_QUERY_TYPE);
1172+
SyntaxUnit.call(this, (modifier ? modifier + " ": "") + (mediaType ? mediaType : "") + (mediaType && features.length > 0 ? " and " : "") + features.join(" and "), line, col, Parser.MEDIA_QUERY_TYPE);
11731173

11741174
/**
11751175
* The media modifier ("not" or "only")

0 commit comments

Comments
 (0)