Open Enyium opened 1 month ago
I'm inclined to suggest that we edit the description of this issue to track support for collapsing margins with ...Box
. What do the others think?
cc @ogoffart @FloVanGH @NigelBreslaw
Agreed, I updated the description.
Layouts should offer the possibility to collapse margins. Such that this code:
would be aligned.
This would be a breaking change unless we add a property to enable it. Or that perhaps we create a "second" stdlib under a new import (eg
@std
)Original description
Please improve docs on layout padding and nesting
Here's a demo with nested layout widgets. It seems the paddings add up to excessive values. There are large gaps at various places. Please document better how the
...Box
layout widgets are supposed to be used in more complex, nested trees. Slint doesn't seem to know concepts like margin collapse or property inheritance from CSS. Are you supposed to specifypadding: 0;
(still benefitting fromspacing
) on every...Box
layout but the outermost one inside aWindow
/inside aGroupBox
, and to surround eachGridBox
in aVerticalLayout
withalignment: start;
when you don't want itsRow
s to be stretched?