grid-row-align.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 GridRowAlign = /*#__PURE__*/function (_Declaration) {
  7. _inheritsLoose(GridRowAlign, _Declaration);
  8. function GridRowAlign() {
  9. return _Declaration.apply(this, arguments) || this;
  10. }
  11. var _proto = GridRowAlign.prototype;
  12. /**
  13. * Do not prefix flexbox values
  14. */
  15. _proto.check = function check(decl) {
  16. return !decl.value.includes('flex-') && decl.value !== 'baseline';
  17. }
  18. /**
  19. * Change property name for IE
  20. */
  21. ;
  22. _proto.prefixed = function prefixed(prop, prefix) {
  23. return prefix + 'grid-row-align';
  24. }
  25. /**
  26. * Change IE property back
  27. */
  28. ;
  29. _proto.normalize = function normalize() {
  30. return 'align-self';
  31. };
  32. return GridRowAlign;
  33. }(Declaration);
  34. _defineProperty(GridRowAlign, "names", ['grid-row-align']);
  35. module.exports = GridRowAlign;