source: trip-planner-front/node_modules/autoprefixer/lib/hacks/pixelated.js@ e29cc2e

Last change on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.8 KB
RevLine 
[6a3a178]1"use strict";
2
3function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
4
5function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
6
7function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
9var OldValue = require('../old-value');
10
11var Value = require('../value');
12
13var Pixelated = /*#__PURE__*/function (_Value) {
14 _inheritsLoose(Pixelated, _Value);
15
16 function Pixelated() {
17 return _Value.apply(this, arguments) || this;
18 }
19
20 var _proto = Pixelated.prototype;
21
22 /**
23 * Use non-standard name for WebKit and Firefox
24 */
25 _proto.replace = function replace(string, prefix) {
26 if (prefix === '-webkit-') {
27 return string.replace(this.regexp(), '$1-webkit-optimize-contrast');
28 }
29
30 if (prefix === '-moz-') {
31 return string.replace(this.regexp(), '$1-moz-crisp-edges');
32 }
33
34 return _Value.prototype.replace.call(this, string, prefix);
35 }
36 /**
37 * Different name for WebKit and Firefox
38 */
39 ;
40
41 _proto.old = function old(prefix) {
42 if (prefix === '-webkit-') {
43 return new OldValue(this.name, '-webkit-optimize-contrast');
44 }
45
46 if (prefix === '-moz-') {
47 return new OldValue(this.name, '-moz-crisp-edges');
48 }
49
50 return _Value.prototype.old.call(this, prefix);
51 };
52
53 return Pixelated;
54}(Value);
55
56_defineProperty(Pixelated, "names", ['pixelated']);
57
58module.exports = Pixelated;
Note: See TracBrowser for help on using the repository browser.