Slide 35
Slide 35 text
Let’s consider what happens when there are even more content elements.
Can you see that the size of the margins represents the grouping of each set of elements?
- The margin between the title and the content is always 8pt, so if you see an 8pt margin, you can recognize that it’s between a title and its content.
- The outer VStack consistently applies a 20pt margin, so if there’s a 20pt margin, you can recognize that it indicates a change of section.
- Each content element is given a uniform 4pt margin. No matter how many content elements are added, if they are separated by 4pt, you can recognize that they belong to the content of Title B.
In this way, you should use the spacing property of VStack or HStack to create whitespace that expresses the grouping of information, and group information appropriately.