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.

33 lines
505 B

  1. 'use strict';
  2. var valid_weights = [
  3. 'normal',
  4. 'bold',
  5. 'bolder',
  6. 'lighter',
  7. '100',
  8. '200',
  9. '300',
  10. '400',
  11. '500',
  12. '600',
  13. '700',
  14. '800',
  15. '900',
  16. 'inherit',
  17. ];
  18. module.exports.isValid = function isValid(v) {
  19. return valid_weights.indexOf(v.toLowerCase()) !== -1;
  20. };
  21. module.exports.definition = {
  22. set: function(v) {
  23. this._setProperty('font-weight', v);
  24. },
  25. get: function() {
  26. return this.getPropertyValue('font-weight');
  27. },
  28. enumerable: true,
  29. configurable: true,
  30. };