Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
resetting proper styles on mirror el
Browse files Browse the repository at this point in the history
  • Loading branch information
syropian committed Jul 25, 2016
1 parent e357424 commit e332de6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ exports.install = function (Vue, options) {
var styles = window.getComputedStyle(_this.el, null);
Object.assign(_this.mirror.style, {
position: "absolute",
top: "0",
left: "0",
top: "-9999px",
left: "-9999px",
width: "auto",
whiteSpace: "nowrap",
opacity: 0,
border: styles.getPropertyValue("border"),
fontSize: styles.getPropertyValue("font-size"),
fontFamily: styles.getPropertyValue("font-family"),
fontWeight: styles.getPropertyValue("font-weight"),
letterSpacing: styles.getPropertyValue("letter-spacing"),
padding: styles.getPropertyValue("padding"),
textTransform: styles.getPropertyValue("text-transform"),
ariaHidden: true,
opacity: 0
ariaHidden: true
});
document.body.appendChild(_this.mirror);
_this.check(_this.el);
Expand Down
6 changes: 4 additions & 2 deletions index.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@
left: "-9999px",
width: "auto",
whiteSpace: "nowrap",
opacity: 0,
border: styles.getPropertyValue("border"),
fontSize: styles.getPropertyValue("font-size"),
fontFamily: styles.getPropertyValue("font-family"),
fontWeight: styles.getPropertyValue("font-weight"),
letterSpacing: styles.getPropertyValue("letter-spacing"),
padding: styles.getPropertyValue("padding"),
textTransform: styles.getPropertyValue("text-transform"),
ariaHidden: true,
opacity: 0
ariaHidden: true
});
document.body.appendChild(_this.mirror);
_this.check(_this.el);
Expand Down
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ exports.install = function(Vue, options){
let styles = window.getComputedStyle(this.el, null);
Object.assign(this.mirror.style, {
position: "absolute",
top: "0",
left: "0",
top: "-9999px",
left: "-9999px",
width: "auto",
whiteSpace: "nowrap",
opacity: 0,
border: styles.getPropertyValue("border"),
fontSize: styles.getPropertyValue("font-size"),
fontFamily: styles.getPropertyValue("font-family"),
fontWeight: styles.getPropertyValue("font-weight"),
letterSpacing: styles.getPropertyValue("letter-spacing"),
padding: styles.getPropertyValue("padding"),
textTransform: styles.getPropertyValue("text-transform"),
ariaHidden: true,
opacity: 0
ariaHidden: true
});
document.body.appendChild(this.mirror);
this.check(this.el);
Expand Down

0 comments on commit e332de6

Please sign in to comment.