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.

26 lines
602 B

  1. 'use strict';
  2. var TYPES = require('../parsers').TYPES;
  3. var valueType = require('../parsers').valueType;
  4. module.exports.isValid = function isValid(v) {
  5. var type = valueType(v);
  6. return (
  7. (type === TYPES.KEYWORD && v.toLowerCase() === 'normal') ||
  8. v.toLowerCase() === 'inherit' ||
  9. type === TYPES.NUMBER ||
  10. type === TYPES.LENGTH ||
  11. type === TYPES.PERCENT
  12. );
  13. };
  14. module.exports.definition = {
  15. set: function(v) {
  16. this._setProperty('line-height', v);
  17. },
  18. get: function() {
  19. return this.getPropertyValue('line-height');
  20. },
  21. enumerable: true,
  22. configurable: true,
  23. };