You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
483 B

  1. 'use strict';
  2. var parseMeasurement = require('../parsers').parseMeasurement;
  3. function parse(v) {
  4. if (String(v).toLowerCase() === 'auto') {
  5. return 'auto';
  6. }
  7. if (String(v).toLowerCase() === 'inherit') {
  8. return 'inherit';
  9. }
  10. return parseMeasurement(v);
  11. }
  12. module.exports.definition = {
  13. set: function(v) {
  14. this._setProperty('width', parse(v));
  15. },
  16. get: function() {
  17. return this.getPropertyValue('width');
  18. },
  19. enumerable: true,
  20. configurable: true,
  21. };