Skip to content

Commit b536b59

Browse files
authored
Merge pull request #5 from syropian/object-assign-polyfill
Adds assign polyfill, fixes formatting issues
2 parents 13885fc + cde13f4 commit b536b59

File tree

5 files changed

+25
-11
lines changed

5 files changed

+25
-11
lines changed

example/App.vue

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,34 +43,37 @@ export default {
4343
</script>
4444

4545
<style lang="scss">
46-
$blue: #21D4FD;
47-
$purple: #B721FF;
48-
@import url('https://fonts.googleapis.com/css?family=Fira+Sans:400,400i,600');
46+
$blue: #21d4fd;
47+
$purple: #b721ff;
48+
@import url("https://fonts.googleapis.com/css?family=Fira+Sans:400,400i,600");
4949
*,
5050
*::before,
5151
*::after {
5252
box-sizing: border-box;
5353
}
54-
html, body {
54+
html,
55+
body {
5556
width: 100vw;
5657
height: 100vh;
57-
margin: 0; padding: 0;
58+
margin: 0;
59+
padding: 0;
5860
}
5961
body {
6062
background-color: $blue;
6163
background-image: linear-gradient(19deg, $blue 0%, $purple 100%);
6264
color: #132830;
6365
display: flex;
6466
justify-content: center;
65-
font-family: 'Fira Sans', sans-serif;
67+
font-family: "Fira Sans", sans-serif;
6668
padding: 50px;
6769
a {
6870
color: $blue;
6971
}
7072
}
7173
.docs {
7274
width: 100%;
73-
h1, h2 {
75+
h1,
76+
h2 {
7477
text-align: center;
7578
}
7679
h1 {
@@ -85,7 +88,7 @@ body {
8588
margin: 25px auto;
8689
padding: 30px;
8790
width: 100%;
88-
input[type=text] {
91+
input[type="text"] {
8992
transition: border-color 250ms ease;
9093
appearance: none;
9194
border-radius: 6px;
@@ -96,8 +99,9 @@ body {
9699
outline: none;
97100
border-color: $purple;
98101
}
99-
&::-webkit-input-placeholder { /* Chrome/Opera/Safari */
100-
color: rgba(19,40,48,.54);
102+
&::-webkit-input-placeholder {
103+
/* Chrome/Opera/Safari */
104+
color: rgba(19, 40, 48, 0.54);
101105
}
102106
}
103107
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"babel-preset-es2015": "^6.24.1",
3030
"chai": "^4.1.1",
3131
"cross-env": "^5.0.5",
32+
"es6-object-assign": "^1.1.0",
3233
"eslint": "^4.5.0",
3334
"eslint-config-prettier": "^2.3.0",
3435
"eslint-plugin-prettier": "^2.2.0",

src/check-width.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
import "es6-object-assign/auto";
2+
13
export default function(el, binding) {
2-
const mirror = document.querySelector(`.vue-input-autowidth-mirror-${el.dataset.uuid}`);
4+
const mirror = document.querySelector(
5+
`.vue-input-autowidth-mirror-${el.dataset.uuid}`
6+
);
37
const defaults = { maxWidth: "none", minWidth: "none", comfortZone: 0 };
48
const options = Object.assign({}, defaults, binding.value);
59

src/vue-input-autowidth.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import "es6-object-assign/auto";
12
import checkWidth from "./check-width";
23

34
export default {

yarn.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2087,6 +2087,10 @@ es6-map@^0.1.3:
20872087
es6-symbol "~3.1.1"
20882088
event-emitter "~0.3.5"
20892089

2090+
es6-object-assign@^1.1.0:
2091+
version "1.1.0"
2092+
resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c"
2093+
20902094
es6-promise@~4.0.3:
20912095
version "4.0.5"
20922096
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.0.5.tgz#7882f30adde5b240ccfa7f7d78c548330951ae42"

0 commit comments

Comments
 (0)