2
0
mirror of https://github.com/tenrok/vue-tribute.git synced 2026-06-16 13:10:35 +03:00

resetting proper styles on mirror el

This commit is contained in:
syropian
2016-07-24 23:07:04 -04:00
parent e357424fc6
commit e332de6f76
3 changed files with 12 additions and 10 deletions
+4 -4
View File
@@ -25,10 +25,11 @@ 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"),
@@ -36,8 +37,7 @@ exports.install = function (Vue, options) {
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);
+4 -2
View File
@@ -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);
+4 -4
View File
@@ -24,10 +24,11 @@ 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"),
@@ -35,8 +36,7 @@ exports.install = function(Vue, options){
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);