• File: MediaQueryList.js
  • Full Path: /var/www/imalireports/node_modules/css-tree/lib/syntax/node/MediaQueryList.js
  • Date Modified: 11/01/2022 10:15 PM
  • File size: 789 bytes
  • MIME-type: text/plain
  • Charset: utf-8
var COMMA = require('../../tokenizer').TYPE.Comma;

module.exports = {
    name: 'MediaQueryList',
    structure: {
        children: [[
            'MediaQuery'
        ]]
    },
    parse: function(relative) {
        var children = this.createList();

        this.scanner.skipSC();

        while (!this.scanner.eof) {
            children.push(this.MediaQuery(relative));

            if (this.scanner.tokenType !== COMMA) {
                break;
            }

            this.scanner.next();
        }

        return {
            type: 'MediaQueryList',
            loc: this.getLocationFromList(children),
            children: children
        };
    },
    generate: function(node) {
        this.children(node, function() {
            this.chunk(',');
        });
    }
};