| 3 | |
| 4 | /** @param {*[]} args */ |
| 5 | const styleExpression = function (args) { |
| 6 | args = Array.prototype.slice.call(args); |
| 7 | if (args.length === 0) { |
| 8 | throw { type: 'Argument', message: 'one or more arguments required' }; |
| 9 | } |
| 10 | |
| 11 | const entityList = [new Variable(args[0].value, this.index, this.currentFileInfo).eval(this.context)]; |
| 12 | |
| 13 | const result = entityList.map(a => { return a.toCSS(this.context); }).join(this.context.compress ? ',' : ', '); |
| 14 | |
| 15 | return new Anonymous(`style(${result})`); |
| 16 | }; |
| 17 | |
| 18 | export default { |
| 19 | /** @param {...*} args */ |