Skip to content

Commit

Permalink
Adjust page block margins and max-width.
Browse files Browse the repository at this point in the history
* Narrow max width for floated blocks. There were many instances smaller than large image types were leaving significant horizontal gaps if they had gaps.

* Account for top margin on floated blocks. Immediate sibling blocks of floated blocks have a top margin that collides weirdly with the block or block group container preceding the floated block.

* Refine selectors for bottom margins on media embed resources. No bottom margins on last or only children. Do the same for asset blocks.

* Item with metadata doesn't need as much default top and bottom margin as it gets.
  • Loading branch information
kimisgold committed Feb 26, 2024
1 parent 98fea76 commit 38981ef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion application/asset/css/page-blocks.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 12 additions & 7 deletions application/asset/sass/page-blocks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@

.page-layout-normal .block-layout-alignment-block-right,
.page-layout-normal .block-layout-alignment-block-left {
max-width: 33.33%;
max-width: 20%;
@include clearfix;
}

.block-layout-alignment-block-left .item.resource:not(:only-child),
.block-layout-alignment-block-right .item.resource:not(:only-child) {
margin: 0 0 1rem 0;
.block-layout-alignment-block-left .item.resource:not(:last-child),
.block-layout-alignment-block-right .item.resource:not(:last-child) {
margin-bottom: $spacing-large;
margin-right: $spacing-large;

.media-render a {
display: block;
Expand Down Expand Up @@ -66,6 +67,11 @@
margin: 0 0 1rem 1rem;
}

.page-layout-normal .block.block-layout-alignment-block-left + .block,
.page-layout-normal .block.block-layout-alignment-block-right + .block {
margin-top: 0;
}

.page-layout-normal .block.block-layout-alignment-block-center {
display: flex;
justify-content: center;
Expand Down Expand Up @@ -155,7 +161,6 @@

.media-embed .resource {
vertical-align: top;
margin-bottom: 1rem;

h3 {
font-size: 1rem;
Expand Down Expand Up @@ -253,7 +258,7 @@
}

.item-with-metadata .show.resource {
margin: (2rem) 0;
margin: 0;
}

.list-of-sites .site-list {
Expand Down Expand Up @@ -286,7 +291,7 @@
height: auto;
}

.assets .asset {
.assets .asset:not(:last-child) {
margin-bottom: 1rem;
}

Expand Down

0 comments on commit 38981ef

Please sign in to comment.