border-width.js 799 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 borderWidthForSide = function (side) { return ({
  6. name: "border-" + side + "-width",
  7. initialValue: '0',
  8. type: IPropertyDescriptor_1.PropertyDescriptorParsingType.VALUE,
  9. prefix: false,
  10. parse: function (token) {
  11. if (parser_1.isDimensionToken(token)) {
  12. return token.number;
  13. }
  14. return 0;
  15. }
  16. }); };
  17. exports.borderTopWidth = borderWidthForSide('top');
  18. exports.borderRightWidth = borderWidthForSide('right');
  19. exports.borderBottomWidth = borderWidthForSide('bottom');
  20. exports.borderLeftWidth = borderWidthForSide('left');
  21. //# sourceMappingURL=border-width.js.map