outlayer icon indicating copy to clipboard operation
outlayer copied to clipboard

Container padding gaps with percentPosition

Open desandro opened this issue 10 years ago • 2 comments

1 Gaps will occur when layout is changed — on resize, or item size changes — with percentPosition: true AND when the container element has padding. See demo: http://codepen.io/desandro/pen/ZGdqqZ

2 Gaps in columns with percent width items and container padding. See demo http://codepen.io/desandro/pen/KpjGxr

desandro avatar Aug 21 '15 17:08 desandro

Tried working on this today. I've found part of the problem is in Item.getPosition, calculating the current position from getComputedStyle. With testing Outlayer, it returns the previous value. For example, if container element width has changed from 400px to 500px, and item left is 10%, it returns 40px, rather than current 50px. But I cannot isolate why this is happening in Outlayer, and not in a reduced test case. See http://codepen.io/desandro/pen/5fbfef89774bd66af01cf8481a0d1349/

desandro avatar Apr 05 '16 19:04 desandro

I was able to identify a bug in Chrome. See https://bugs.chromium.org/p/chromium/issues/detail?id=601030#

desandro avatar Apr 06 '16 14:04 desandro