z-index.js 751 B

123456789101112131415161718192021
  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 tokenizer_1 = require("../syntax/tokenizer");
  6. exports.zIndex = {
  7. name: 'z-index',
  8. initialValue: 'auto',
  9. prefix: false,
  10. type: IPropertyDescriptor_1.PropertyDescriptorParsingType.VALUE,
  11. parse: function (token) {
  12. if (token.type === tokenizer_1.TokenType.IDENT_TOKEN) {
  13. return { auto: true, order: 0 };
  14. }
  15. if (parser_1.isNumberToken(token)) {
  16. return { auto: false, order: token.number };
  17. }
  18. throw new Error("Invalid z-index number parsed");
  19. }
  20. };
  21. //# sourceMappingURL=z-index.js.map