fontStyle.js 391 B

123456789101112131415161718
  1. 'use strict';
  2. var valid_styles = ['normal', 'italic', 'oblique', 'inherit'];
  3. module.exports.isValid = function(v) {
  4. return valid_styles.indexOf(v.toLowerCase()) !== -1;
  5. };
  6. module.exports.definition = {
  7. set: function(v) {
  8. this._setProperty('font-style', v);
  9. },
  10. get: function() {
  11. return this.getPropertyValue('font-style');
  12. },
  13. enumerable: true,
  14. configurable: true,
  15. };