Jhey Tompkins
1 min readMar 6, 2018

--

Hey Roderick Gadellaa đź‘‹

You are certainly correct with the use of parseFloat you’ve pointed out there 👍 That could certainly help.

However, I deliberately avoid the use of margin on the panels. I also use * { box-sizing: border-box; }. This is be design. For gaps between the panels, I would opt for using uniform padding on the panels. This way, the extra logic doesn’t need to be implemented and the padding will be accounted for when using getComputedStyle.

The demo certainly leans more towards proof of concept. I’d encourage tweaking it for your designs. For example, the demo doesn’t cater for img loading scenarios.

Hope that helps!

--

--

Jhey Tompkins
Jhey Tompkins

Written by Jhey Tompkins

I make awesome things for awesome people!

Responses (1)