-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(issue #4235) style must not have space
fixes issue #4235 where container query style would have invalid space after keyword
- Loading branch information
Showing
10 changed files
with
170 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import Variable from '../tree/variable'; | ||
import Anonymous from '../tree/variable'; | ||
|
||
const styleExpression = function (args) { | ||
args = Array.prototype.slice.call(args); | ||
switch (args.length) { | ||
case 0: throw { type: 'Argument', message: 'one or more arguments required' }; | ||
} | ||
|
||
const entityList = [new Variable(args[0].value, this.index, this.currentFileInfo).eval(this.context)]; | ||
|
||
args = entityList.map(a => { return a.toCSS(this.context); }).join(this.context.compress ? ',' : ', '); | ||
|
||
return new Anonymous(`style(${args})`); | ||
}; | ||
|
||
export default { | ||
style: function(...args) { | ||
try { | ||
return styleExpression.call(this, args); | ||
} catch (e) {} | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters