Skip to content
Snippets Groups Projects
Commit 098e26ce authored by Kevin Paxman's avatar Kevin Paxman
Browse files

ISTWCMS-5898: adjust header spacing and fix display quirks

parent 7bece26c
No related branches found
No related tags found
1 merge request!70ISTWCMS-5898: section-spacing-seperator and column-seperator css
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
} }
// Add top margin when headers are preceded by other elements (p, ul, etc.) // Add top margin when headers are preceded by other elements (p, ul, etc.)
* + & { // (excluding the uw-admin-label that identifies the blocks in layout builder)
*:not(.uw-admin-label) + & {
margin-top: var(--size-2); margin-top: var(--size-2);
} }
......
...@@ -13,9 +13,27 @@ ...@@ -13,9 +13,27 @@
&.block-local-tasks-block { &.block-local-tasks-block {
margin-bottom: 0; margin-bottom: 0;
} }
// Move block title to top of block, while preserving spacing underneath.
& > {
h2:first-child,
.uw-admin-label + h2 {
line-height: 1em; /* using EMs because we want it to be the height of the text, regardless of what the font size is */
margin: 0 0 var(--size-2);
padding-top: 0;
}
}
&:last-of-type { &:last-of-type {
margin-bottom: 0; margin-bottom: 0;
} }
// Move an initial header in copy text to top of block, while preserving spacing underneath, unless there was a block title..
.uw-admin-label + .contextual + .uw-copy-text,
.uw-copy-text:first-child {
.uw-copy-text__wrapper > :where(h2, h3, h4, h5, h6):first-child {
line-height: 1em; /* using EMs because we want it to be the height of the text, regardless of what the font size is */
margin: 0 0 var(--size-2);
padding-top: 0;
}
}
} }
// disable margin for layout builder blocks // disable margin for layout builder blocks
......
...@@ -403,3 +403,9 @@ $sidebar-width: 18.75rem; ...@@ -403,3 +403,9 @@ $sidebar-width: 18.75rem;
gap: var(--size-1); gap: var(--size-1);
justify-content: flex-end; justify-content: flex-end;
} }
// Make views display properly in layout builder (particularly narrow columns).
.layout-builder-block.views-element-container {
padding: 1.5em; /* The default for layout builder blocks; for some reason it only works if I set it explicitly */
width: auto;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment