diff --git a/core-list.html b/core-list.html index 1b41a76..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; @@ -1058,7 +1059,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 +1069,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; }