overflow.js 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var IPropertyDescriptor_1 = require("../IPropertyDescriptor");
  4. var parser_1 = require("../syntax/parser");
  5. var OVERFLOW;
  6. (function (OVERFLOW) {
  7. OVERFLOW[OVERFLOW["VISIBLE"] = 0] = "VISIBLE";
  8. OVERFLOW[OVERFLOW["HIDDEN"] = 1] = "HIDDEN";
  9. OVERFLOW[OVERFLOW["SCROLL"] = 2] = "SCROLL";
  10. OVERFLOW[OVERFLOW["AUTO"] = 3] = "AUTO";
  11. })(OVERFLOW = exports.OVERFLOW || (exports.OVERFLOW = {}));
  12. exports.overflow = {
  13. name: 'overflow',
  14. initialValue: 'visible',
  15. prefix: false,
  16. type: IPropertyDescriptor_1.PropertyDescriptorParsingType.LIST,
  17. parse: function (tokens) {
  18. return tokens.filter(parser_1.isIdentToken).map(function (overflow) {
  19. switch (overflow.value) {
  20. case 'hidden':
  21. return OVERFLOW.HIDDEN;
  22. case 'scroll':
  23. return OVERFLOW.SCROLL;
  24. case 'auto':
  25. return OVERFLOW.AUTO;
  26. case 'visible':
  27. default:
  28. return OVERFLOW.VISIBLE;
  29. }
  30. });
  31. }
  32. };
  33. //# sourceMappingURL=overflow.js.map