Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
81145 views
1
'use strict';
2
3
var shorthandParser = require('../parsers').shorthandParser;
4
var shorthandSetter = require('../parsers').shorthandSetter;
5
var shorthandGetter = require('../parsers').shorthandGetter;
6
7
var shorthand_for = {
8
'background-color': require('./backgroundColor'),
9
'background-image': require('./backgroundImage'),
10
'background-repeat': require('./backgroundRepeat'),
11
'background-attachment': require('./backgroundAttachment'),
12
'background-position': require('./backgroundPosition')
13
};
14
15
module.exports.isValid = function isValid(v) {
16
return shorthandParser(v, shorthand_for) !== undefined;
17
};
18
19
module.exports.definition = {
20
set: shorthandSetter('background', shorthand_for),
21
get: shorthandGetter('background', shorthand_for),
22
enumerable: true,
23
configurable: true
24
};
25
26