News for hackers. Stuff that matters.
Re:Designing furniture using the CSS grid (2023) by alnvdl on Sunday May 05, 2024 @04:15PM (#40267856)
The tool doesn't actually calculate the measurements. It just specifies the grid, and then extracts whatever the browser calculated as the width/height, rounding the numbers for displaying them nicely.

The scale is there just to make things look nice in the browser and/or in print format, and it can slightly corrupt the numbers as you noticed, especially when it's a small or odd number. I guess one way to get rid of the scale would be to introduce variable font sizes and automatically zoom the grid only for display. But like I said in the post:

> I guess making it more “serious” would have been possible, but in this case I just wanted to get my furniture designed fast, and keeping the code simple and small helped in that.

See: https://github.com/alnvdl/squareplanner/blob/01bdcb050ce58a4...

I also got these designs printed to follow during the construction, so I just picked scale numbers arbitrarily in a way that made them look good in the browser and fit in the paper size. So "portability" and pleasing visuals were more important than accuracy.

I could do that because in my particular case any imprecisions got flagged by the real 3D CAD used by the furniture company to formalize the project :)

There are no comments on this comment yet.