dmotz / oriDomi

🪭 Fold up DOM elements like paper

Home Page:http://oridomi.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Calculation of width

menkari opened this issue · comments

Been playing around with the oriDomi and I love it!, such a snazzy little gem that I will no doubt be using in some upcoming applications. I found an issue when I put together a small parent > details kind of layout which has the same css applied to both. The problem I came across was that when the child element (which has oriDomi applied) is rendered, it does not respect the proper box model. In fact it kind of looks like it goes the other way and is smaller by a factor of the padding applied.

This also happens when you set the element width at 100%. Has an unsightly gap down the right hand side. :(

Have a peek at this fiddle and see what you think? (http://jsfiddle.net/y8z72y6q/)

This is an unfortunate tradeoff OriDomi does to compensate for the way browsers render gaps between antialiased 3D-transformed elements. You can overcome this by either setting a gapNudge configuration value of 0, or by making your element wider than 100% to compensate. See this duplicate issue for more details: #29