STYLE
Spacing
Spacing is the negative area between elements and components. It is controlled in code with margin
and padding.
Spacing Scale
Use the spacing scale when building individual components. It includes small increments needed to create appropriate spatial relationships for detail-level designs.
rem | px | Example |
---|---|---|
0.125 | 2 | |
0.25 | 4 | |
0.5 | 8 | |
0.75 | 12 | |
1 | 16 | |
1.5 | 24 | |
2 | 32 | |
2.5 | 40 | |
3 | 48 | |
4 | 64 |
2rem Spacing from top
Optional Label
1rem Spacing
Heading
2rem Spacing
Lorem ipsum dolor sit amet consectetur adipisicing elit. Pariatur distinctio perferendis tempore fugiat
. Voluptatum odit doloremque veritatis debitis provident, eum laborum nostrum id quia. Quasi alias id similique excepturi illum.
1rem Spacing
HTML AND CSS Code
HTML CODE
2rem Spacing from topOptional Label1rem SpacingHeading2rem SpacingLorem ipsum dolor sit amet consectetur adipisicing elit. Pariatur distinctio perferendis tempore fugiat . Voluptatum odit doloremque veritatis debitis provident, eum laborum nostrum id quia. Quasi alias id similique excepturi illum.1rem Spacing
CSS CODE
.box5{ width:1rem; height:1rem; } .box7{ width:2rem; height:2rem; } .box11{ width:20rem; height:2rem; background-color:#69cff9; font-size: smaller; text-align: center; } .box12{ width:20rem; height:1rem; background-color:#69cff9; font-size: smaller; text-align: center; } .boxcont{ display:flex; flex-direction: row; margin-left:2rem; margin-right:2rem; margin-top:0; } .label{ margin-left: 2rem; } .labelcont{ margin-top:2rem; padding:0; background-color: white; border: 1px solid whitesmoke; box-shadow: 0 20px 20px -14px rgba(0, 0, 0, 0.25); margin-left:2rem; width: 400px; }