Skip to content

Using a Negative Margin on a BlockElement Breaks Height Calculation #32

@Jordan9232

Description

@Jordan9232

I've tried using a negative top margin on a block element like this:

var div = new Div { Margin = new Thickness(0, -1, 0, 0) };

I've added some children to this element that should span 6 lines in height. Using the -1 top margin causes the element to only have a height of 1 line and the other lines are missing.

It will only render with the correct height if I remove the negative margin. It also seems to work okay if I use a bottom margin like this, but this causes an extra line to render after my div which is not what I want:

var div = new Div { Margin = new Thickness(0, -1, 0, 1) };

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions