fontWeight.js 497 B

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