source: trip-planner-front/node_modules/autoprefixer/lib/hacks/image-rendering.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: 2.1 KB
Line 
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 Declaration = require('../declaration');
10
11var ImageRendering = /*#__PURE__*/function (_Declaration) {
12 _inheritsLoose(ImageRendering, _Declaration);
13
14 function ImageRendering() {
15 return _Declaration.apply(this, arguments) || this;
16 }
17
18 var _proto = ImageRendering.prototype;
19
20 /**
21 * Add hack only for crisp-edges
22 */
23 _proto.check = function check(decl) {
24 return decl.value === 'pixelated';
25 }
26 /**
27 * Change property name for IE
28 */
29 ;
30
31 _proto.prefixed = function prefixed(prop, prefix) {
32 if (prefix === '-ms-') {
33 return '-ms-interpolation-mode';
34 }
35
36 return _Declaration.prototype.prefixed.call(this, prop, prefix);
37 }
38 /**
39 * Change property and value for IE
40 */
41 ;
42
43 _proto.set = function set(decl, prefix) {
44 if (prefix !== '-ms-') return _Declaration.prototype.set.call(this, decl, prefix);
45 decl.prop = '-ms-interpolation-mode';
46 decl.value = 'nearest-neighbor';
47 return decl;
48 }
49 /**
50 * Return property name by spec
51 */
52 ;
53
54 _proto.normalize = function normalize() {
55 return 'image-rendering';
56 }
57 /**
58 * Warn on old value
59 */
60 ;
61
62 _proto.process = function process(node, result) {
63 return _Declaration.prototype.process.call(this, node, result);
64 };
65
66 return ImageRendering;
67}(Declaration);
68
69_defineProperty(ImageRendering, "names", ['image-rendering', 'interpolation-mode']);
70
71module.exports = ImageRendering;
Note: See TracBrowser for help on using the repository browser.