forked from fidian/PrettyCSS
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtext-shadow.js
More file actions
41 lines (31 loc) · 845 Bytes
/
text-shadow.js
File metadata and controls
41 lines (31 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* <text-shadow>
*
* CSS3: inherit | none | <text-shadow-single>#
*/
"use strict";
var base = require('./base');
var util = require('../../util');
var validate = require('./validate');
var TextShadow = base.baseConstructor();
util.extend(TextShadow.prototype, base.base, {
name: "text-shadow"
});
exports.parse = function (unparsedReal, bucket, container) {
var ts = new TextShadow(bucket, container, unparsedReal);
var unparsed = unparsedReal.clone();
ts.debug('parse', unparsedReal);
validate.call(ts, 'minimumCss', ts.firstToken(), 3);
if (ts.handleInherit(function () {})) {
return ts;
}
if (ts.unparsed.isContent('none')) {
ts.add(ts.unparsed.advance());
return ts;
}
ts.repeatWithCommas = true;
if (! ts.repeatParser([ bucket['text-shadow-single'] ])) {
return null;
}
ts.warnIfInherit();
return ts;
};