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.

19 lines
548 B

  1. 'use strict';
  2. var parseNumber = require('../parsers').parseNumber;
  3. var POSITION_AT_SHORTHAND = require('../constants').POSITION_AT_SHORTHAND;
  4. module.exports.isValid = function isValid(v, positionAtFlexShorthand) {
  5. return parseNumber(v) !== undefined && positionAtFlexShorthand === POSITION_AT_SHORTHAND.second;
  6. };
  7. module.exports.definition = {
  8. set: function(v) {
  9. this._setProperty('flex-shrink', parseNumber(v));
  10. },
  11. get: function() {
  12. return this.getPropertyValue('flex-shrink');
  13. },
  14. enumerable: true,
  15. configurable: true,
  16. };