crisp-edges.js 975 B

12345678910111213141516171819202122232425262728293031
  1. (function() {
  2. var CrispEdges, Value,
  3. __extends = 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. Value = require('../value');
  6. CrispEdges = (function(_super) {
  7. __extends(CrispEdges, _super);
  8. function CrispEdges() {
  9. return CrispEdges.__super__.constructor.apply(this, arguments);
  10. }
  11. CrispEdges.names = ['crisp-edges'];
  12. CrispEdges.prototype.replace = function(string, prefix) {
  13. if (prefix === '-webkit-') {
  14. return string.replace(this.regexp(), '$1-webkit-optimize-contrast');
  15. } else {
  16. return CrispEdges.__super__.replace.apply(this, arguments);
  17. }
  18. };
  19. return CrispEdges;
  20. })(Value);
  21. module.exports = CrispEdges;
  22. }).call(this);