Modonomicon

Modonomicon

1M Downloads

Better alignment of page elements

Noaaan opened this issue ยท 4 comments

commented

Problem
While redesigning the guidebook for Spectrum some of our devs has issues aligning images properly. Generally it seems that page elements cannot be aligned, with the exception of text.

image

Describe the solution you'd like
Ideally there would be some way to do this, to allow for nicer looking guidebooks

commented

@Noaaan can you specify what you are looking for?
Text currently uses a global offset (IIRC). Would you like to move all images (maybe images currently do not respect the global offsets / margins?) or would you like an optional property on images (and recipes, etc I presume) that allows to move them individually

commented

Titles, images and all are centered on the default page width, not factoring in text offsets (used for making the lines wider/narrower), making images not look centered anymore with like "left_text_offset != 0".

The (probably maybe hopefully) easiest fix would be factoring in text offsets when centering titles, images and other stuff that should render centered.

commented

Ok that makes sense, a good starting point at least to align that behaviour! Thanks!

EDIT: This needs a bit more looking into, when just applying the offsets the elements do not align.

commented

I think in order to do this properly the page alignment for non-text elements needs to be changed to be centered.
The offsets should define the area in which can be rendered, and if that area is smaller than the element, the element needs to shrink. I've yet to figure out the math for that :D