background-origin.js 785 B

123456789101112131415161718192021222324
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.backgroundOrigin = void 0;
  4. var parser_1 = require("../syntax/parser");
  5. exports.backgroundOrigin = {
  6. name: 'background-origin',
  7. initialValue: 'border-box',
  8. prefix: false,
  9. type: 1 /* LIST */,
  10. parse: function (_context, 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