grid-column-align.js 1.6 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 GridColumnAlign = /*#__PURE__*/function (_Declaration) {
  7. _inheritsLoose(GridColumnAlign, _Declaration);
  8. function GridColumnAlign() {
  9. return _Declaration.apply(this, arguments) || this;
  10. }
  11. var _proto = GridColumnAlign.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-column-align';
  24. }
  25. /**
  26. * Change IE property back
  27. */
  28. ;
  29. _proto.normalize = function normalize() {
  30. return 'justify-self';
  31. };
  32. return GridColumnAlign;
  33. }(Declaration);
  34. _defineProperty(GridColumnAlign, "names", ['grid-column-align']);
  35. module.exports = GridColumnAlign;