Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split margin (top, bottom, left, right) #105

Open
haschdl opened this issue Mar 6, 2022 · 2 comments
Open

Split margin (top, bottom, left, right) #105

haschdl opened this issue Mar 6, 2022 · 2 comments

Comments

@haschdl
Copy link

haschdl commented Mar 6, 2022

It is customary in photography and other forms of prints to have asymmetrical margins. A perfectly centred piece is considered less pleasing to the viewer. It is common for example to have a 10% margin in the left and right, and 7% top and 13% (or approximately double the margin size in the bottom).

For that reason, I would like to propose to optionally have distinct margins sizes. To keep the UI exactly the same, the parsing of the margin field could be smarter, and accept both 1 number, 4 numbers (top, right, bottom, left), and accept both absolute numbers and percentages, in similar fashion as the margin attribute in CSS (see specification).

For example:

  • "20mm" or "20" is treated as absolute number, for all 4 sides
  • "20 10 40 10" would be treated as 20mm margin top, 10mm right, 40 bottom and 10 left.
  • "20%" is parsed as 20% for all sides
  • "7% 10% 13% 10%" is parsed as 7% top margin, 10% right and left, and 13% bottom margin

This would also bring the advantage of having a more flexible layout system and eliminate the need for an extra "bounding box" to be added to the SVG itself.

@jimmykl
Copy link

jimmykl commented Mar 6, 2022

+1 for this, it's the main reason I still run artwork through Inkscape/Illustrator before plotting

@ianstormtaylor
Copy link

ianstormtaylor commented Jun 22, 2022

Would also love this. For works that aren't the exact dimensions as the paper it would be useful to choose which side (top vs. bottom, left vs. right) got prioritized.

Edit: just found this answer #104 (comment) which describes a solution to my issue—putting hidden rectangles in the SVG as a separate layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants