Skip to content

Commit

Permalink
Add explanatory comment as to the usage of last-child
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Nov 15, 2021
1 parent 3f56752 commit f808cd4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/components/src/tools-panel/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ export const ToolsPanelItem = css`
&& ${ BaseControlWrapper } {
margin-bottom: 0;
/**
* To maintain proper spacing within a base control, the field's bottom
* margin should only be removed when there is no help text included and
* it is therefore the last-child.
*/
${ BaseControlField }:last-child {
margin-bottom: 0;
}
Expand Down

0 comments on commit f808cd4

Please sign in to comment.