Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: this PR includes breaking changes, so should probably be released for v4
tldr;
Longer description
I noticed a few inconsistencies between how table cells handle margins and how text items handle margins.
Docs for text:
Docs for tables:
for tables, the docs say you can use an array in TRBL format, and there is an undocumented feature where you can supply margins in inches, which is very helpful since the PowerPoint UI also shows margins in inches, so if you are copying a design made in PowerPoint into code you can just use the inch values.
Text items also accept an array for margins, but it's undocumented, and processed LRBT, so even if you find the doc for table cells and deduce that it's supported for text, you're likely to be tripped up by the different order. On top of that, margins have to be in points for text, but for tables margins values < 1 are processed as inches, and >= 1 are processed as points.
Since v4 is being released soon, I recommend switching the docs to specify that margins should be supplied in inches rather than points since it's a lot more helpful, and add the margin array doc to text. This pr does that switch. I also noticed there is some code for allowing table cells to accept either points or inches, but the way the logic is structured it wouldn't work for margins over 1". That probably won't come up for table cells, but it might for text, so I don't think the logic is very sound to use for text.