background-origin.js 847 B

123456789101112131415161718192021222324
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var IPropertyDescriptor_1 = require("../IPropertyDescriptor");
  4. var parser_1 = require("../syntax/parser");
  5. exports.backgroundOrigin = {
  6. name: 'background-origin',
  7. initialValue: 'border-box',
  8. prefix: false,
  9. type: IPropertyDescriptor_1.PropertyDescriptorParsingType.LIST,
  10. parse: function (tokens) {
  11. return tokens.map(function (token) {
  12. if (parser_1.isIdentToken(token)) {
  13. switch (token.value) {
  14. case 'padding-box':
  15. return 1 /* PADDING_BOX */;
  16. case 'content-box':
  17. return 2 /* CONTENT_BOX */;
  18. }
  19. }
  20. return 0 /* BORDER_BOX */;
  21. });
  22. }
  23. };
  24. //# sourceMappingURL=background-origin.js.map