I have a dynamically sized grid of square divs, each of which has a
height and width of calc(100vmin / ${props => props.gridSize })
;
This doesn't always divide evenly, so there gaps between the lines of some of my grid lines.
I don't seem have access to SASS/LESS helpers like floor
or ceil
(they are not included in syled-components/polish
either). Plain javascript (Math.floor
) doesn't seem to be an option either, since it doesn't know how to handle vh
units. Is there any way to ensure a whole pixel number from the result of this calc
?