source: frontend/node_modules/cssstyle/lib/properties/width.js

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

Fix frontend appearance

  • Property mode set to 100644
File size: 483 bytes
RevLine 
[9af201e]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.definition = {
16 set: function(v) {
17 this._setProperty('width', parse(v));
18 },
19 get: function() {
20 return this.getPropertyValue('width');
21 },
22 enumerable: true,
23 configurable: true,
24};
Note: See TracBrowser for help on using the repository browser.