first commit
This commit is contained in:
15
build/node_modules/css-tree/lib/syntax/function/element.js
generated
vendored
Normal file
15
build/node_modules/css-tree/lib/syntax/function/element.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
var List = require('../../utils/list');
|
||||
|
||||
// https://drafts.csswg.org/css-images-4/#element-notation
|
||||
// https://developer.mozilla.org/en-US/docs/Web/CSS/element
|
||||
module.exports = function() {
|
||||
this.scanner.skipSC();
|
||||
|
||||
var id = this.IdSelector();
|
||||
|
||||
this.scanner.skipSC();
|
||||
|
||||
return new List().appendData(
|
||||
id
|
||||
);
|
||||
};
|
||||
9
build/node_modules/css-tree/lib/syntax/function/expression.js
generated
vendored
Normal file
9
build/node_modules/css-tree/lib/syntax/function/expression.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
var List = require('../../utils/list');
|
||||
|
||||
// legacy IE function
|
||||
// expression '(' raw ')'
|
||||
module.exports = function() {
|
||||
return new List().appendData(
|
||||
this.Raw(this.scanner.currentToken, 0, 0, false, false)
|
||||
);
|
||||
};
|
||||
41
build/node_modules/css-tree/lib/syntax/function/var.js
generated
vendored
Normal file
41
build/node_modules/css-tree/lib/syntax/function/var.js
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
var List = require('../../utils/list');
|
||||
var TYPE = require('../../tokenizer').TYPE;
|
||||
|
||||
var IDENTIFIER = TYPE.Identifier;
|
||||
var COMMA = TYPE.Comma;
|
||||
var SEMICOLON = TYPE.Semicolon;
|
||||
var HYPHENMINUS = TYPE.HyphenMinus;
|
||||
var EXCLAMATIONMARK = TYPE.ExclamationMark;
|
||||
|
||||
// var '(' ident (',' <value>? )? ')'
|
||||
module.exports = function() {
|
||||
var children = new List();
|
||||
|
||||
this.scanner.skipSC();
|
||||
|
||||
var identStart = this.scanner.tokenStart;
|
||||
|
||||
this.scanner.eat(HYPHENMINUS);
|
||||
if (this.scanner.source.charCodeAt(this.scanner.tokenStart) !== HYPHENMINUS) {
|
||||
this.scanner.error('HyphenMinus is expected');
|
||||
}
|
||||
this.scanner.eat(IDENTIFIER);
|
||||
|
||||
children.appendData({
|
||||
type: 'Identifier',
|
||||
loc: this.getLocation(identStart, this.scanner.tokenStart),
|
||||
name: this.scanner.substrToCursor(identStart)
|
||||
});
|
||||
|
||||
this.scanner.skipSC();
|
||||
|
||||
if (this.scanner.tokenType === COMMA) {
|
||||
children.appendData(this.Operator());
|
||||
children.appendData(this.parseCustomProperty
|
||||
? this.Value(null)
|
||||
: this.Raw(this.scanner.currentToken, EXCLAMATIONMARK, SEMICOLON, false, false)
|
||||
);
|
||||
}
|
||||
|
||||
return children;
|
||||
};
|
||||
Reference in New Issue
Block a user