From 2077cfbe2ab874a5e11fc40f79e1a510c98e758a Mon Sep 17 00:00:00 2001 From: Jan Miksovsky Date: Mon, 26 Jan 2015 16:00:14 -0800 Subject: [PATCH 1/2] Use translate instead of translate3d to avoid text blurring --- core-list.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core-list.html b/core-list.html index 1b41a76..7a0866c 100644 --- a/core-list.html +++ b/core-list.html @@ -1058,7 +1058,7 @@ divider.style.width = this.width * this._rowFactor + 'px'; } divider.style.transform = divider.style.webkitTransform = - 'translate3d(' + x + 'px,' + y + 'px,0)'; + 'translate(' + x + 'px,' + y + 'px)'; divider._translateX = x; divider._translateY = y; } @@ -1068,7 +1068,7 @@ if (physicalItem._translateX != x || physicalItem._translateY != y) { physicalItem.style.opacity = 1; physicalItem.style.transform = physicalItem.style.webkitTransform = - 'translate3d(' + x + 'px,' + y + 'px,0)'; + 'translate(' + x + 'px,' + y + 'px)'; physicalItem._translateX = x; physicalItem._translateY = y; } From 458ebdfdd3c69d647a002a77bd38a71ac42a1907 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Thu, 29 Jan 2015 19:29:28 -0800 Subject: [PATCH 2/2] Fix padding calculation bug. --- core-list.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core-list.html b/core-list.html index 7a0866c..12189ba 100644 --- a/core-list.html +++ b/core-list.html @@ -547,6 +547,7 @@ if (getComputedStyle(this._target).position == 'static') { this._target.style.position = 'relative'; } + this._target.style.boxSizing = this._target.style.mozBoxSizing = 'border-box'; this.style.overflowY = (target == this) ? 'auto' : null; }, @@ -615,9 +616,9 @@ if (!this.width) { throw 'Grid requires the `width` property to be set'; } - this._rowFactor = Math.floor(this._target.offsetWidth / this.width) || 1; var cs = getComputedStyle(this._target); var padding = parseInt(cs.paddingLeft || 0) + parseInt(cs.paddingRight || 0); + this._rowFactor = Math.floor((this._target.offsetWidth - padding) / this.width) || 1; this._rowMargin = (this._target.offsetWidth - (this._rowFactor * this.width) - padding) / 2; } else { this._rowFactor = 1;