position.js 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var IPropertyDescriptor_1 = require("../IPropertyDescriptor");
  4. var POSITION;
  5. (function (POSITION) {
  6. POSITION[POSITION["STATIC"] = 0] = "STATIC";
  7. POSITION[POSITION["RELATIVE"] = 1] = "RELATIVE";
  8. POSITION[POSITION["ABSOLUTE"] = 2] = "ABSOLUTE";
  9. POSITION[POSITION["FIXED"] = 3] = "FIXED";
  10. POSITION[POSITION["STICKY"] = 4] = "STICKY";
  11. })(POSITION = exports.POSITION || (exports.POSITION = {}));
  12. exports.position = {
  13. name: 'position',
  14. initialValue: 'static',
  15. prefix: false,
  16. type: IPropertyDescriptor_1.PropertyDescriptorParsingType.IDENT_VALUE,
  17. parse: function (position) {
  18. switch (position) {
  19. case 'relative':
  20. return POSITION.RELATIVE;
  21. case 'absolute':
  22. return POSITION.ABSOLUTE;
  23. case 'fixed':
  24. return POSITION.FIXED;
  25. case 'sticky':
  26. return POSITION.STICKY;
  27. }
  28. return POSITION.STATIC;
  29. }
  30. };
  31. //# sourceMappingURL=position.js.map