border-image.js 923 B

12345678910111213141516171819202122232425262728
  1. (function() {
  2. var BorderImage, Declaration,
  3. extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
  4. hasProp = {}.hasOwnProperty;
  5. Declaration = require('../declaration');
  6. BorderImage = (function(superClass) {
  7. extend(BorderImage, superClass);
  8. function BorderImage() {
  9. return BorderImage.__super__.constructor.apply(this, arguments);
  10. }
  11. BorderImage.names = ['border-image'];
  12. BorderImage.prototype.set = function(decl, prefix) {
  13. decl.value = decl.value.replace(/\s+fill(\s)/, '$1');
  14. return BorderImage.__super__.set.call(this, decl, prefix);
  15. };
  16. return BorderImage;
  17. })(Declaration);
  18. module.exports = BorderImage;
  19. }).call(this);