text-decoration-skip-ink.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. "use strict";
  2. function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
  3. function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
  4. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  5. var Declaration = require('../declaration');
  6. var TextDecorationSkipInk = /*#__PURE__*/function (_Declaration) {
  7. _inheritsLoose(TextDecorationSkipInk, _Declaration);
  8. function TextDecorationSkipInk() {
  9. return _Declaration.apply(this, arguments) || this;
  10. }
  11. var _proto = TextDecorationSkipInk.prototype;
  12. /**
  13. * Change prefix for ink value
  14. */
  15. _proto.set = function set(decl, prefix) {
  16. if (decl.prop === 'text-decoration-skip-ink' && decl.value === 'auto') {
  17. decl.prop = prefix + 'text-decoration-skip';
  18. decl.value = 'ink';
  19. return decl;
  20. } else {
  21. return _Declaration.prototype.set.call(this, decl, prefix);
  22. }
  23. };
  24. return TextDecorationSkipInk;
  25. }(Declaration);
  26. _defineProperty(TextDecorationSkipInk, "names", ['text-decoration-skip-ink', 'text-decoration-skip']);
  27. module.exports = TextDecorationSkipInk;