Skip to content

Commit

Permalink
fix: Exclude extraBg from children of o-stack
Browse files Browse the repository at this point in the history
- Fixes the unwanted spacing top of the layout where .c-extraBackground is direct children of .o-stack
  • Loading branch information
egeesin committed Feb 26, 2024
1 parent 265ae4c commit 432b86c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions static/style/base/02-primitive.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
justify-content: flex-start;
}
/* Don't apply any top or down margin to direct children primitive as default */
.o-stack > :not(.u-visuallyHidden) {
.o-stack > :not(.u-visuallyHidden, .c-extraBackground) {
margin-block: 0;
}


/* Only apply top margin if isn't the first direct child of stack layout */
/* (Except visually hidden elements or rusty grid masonry column) */
.o-stack > :not(.u-visuallyHidden) + :not(.u-visuallyHidden) {
.o-stack > :not(.u-visuallyHidden, .c-extraBackground) + :not(.u-visuallyHidden, .c-extraBackground) {
margin-block-start: var(--rhythmUnit);
}

Expand Down

0 comments on commit 432b86c

Please sign in to comment.