source: trip-planner-front/node_modules/autoprefixer/lib/hacks/placeholder.js@ 6c1585f

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

initial commit

  • Property mode set to 100644
File size: 1.7 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 Selector = require('../selector');
10
11var Placeholder = /*#__PURE__*/function (_Selector) {
12 _inheritsLoose(Placeholder, _Selector);
13
14 function Placeholder() {
15 return _Selector.apply(this, arguments) || this;
16 }
17
18 var _proto = Placeholder.prototype;
19
20 /**
21 * Add old mozilla to possible prefixes
22 */
23 _proto.possible = function possible() {
24 return _Selector.prototype.possible.call(this).concat(['-moz- old', '-ms- old']);
25 }
26 /**
27 * Return different selectors depend on prefix
28 */
29 ;
30
31 _proto.prefixed = function prefixed(prefix) {
32 if (prefix === '-webkit-') {
33 return '::-webkit-input-placeholder';
34 }
35
36 if (prefix === '-ms-') {
37 return '::-ms-input-placeholder';
38 }
39
40 if (prefix === '-ms- old') {
41 return ':-ms-input-placeholder';
42 }
43
44 if (prefix === '-moz- old') {
45 return ':-moz-placeholder';
46 }
47
48 return "::" + prefix + "placeholder";
49 };
50
51 return Placeholder;
52}(Selector);
53
54_defineProperty(Placeholder, "names", ['::placeholder']);
55
56module.exports = Placeholder;
Note: See TracBrowser for help on using the repository browser.