source: frontend/node_modules/cssstyle/lib/properties/flexBasis.js@ 9af201e

Last change on this file since 9af201e was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 577 bytes
Line 
1'use strict';
2
3var parseMeasurement = require('../parsers').parseMeasurement;
4
5function parse(v) {
6 if (String(v).toLowerCase() === 'auto') {
7 return 'auto';
8 }
9 if (String(v).toLowerCase() === 'inherit') {
10 return 'inherit';
11 }
12 return parseMeasurement(v);
13}
14
15module.exports.isValid = function isValid(v) {
16 return parse(v) !== undefined;
17};
18
19module.exports.definition = {
20 set: function(v) {
21 this._setProperty('flex-basis', parse(v));
22 },
23 get: function() {
24 return this.getPropertyValue('flex-basis');
25 },
26 enumerable: true,
27 configurable: true,
28};
Note: See TracBrowser for help on using the repository browser.