diff --git a/src/patterns/03-layouts/block/_block.scss b/src/patterns/03-layouts/block/_block.scss index 85c566ef733ceb64cf77a5aa5d70fae265fb9d49..9753ad4dd89b141c45cb5f39ce10857402198ce6 100644 --- a/src/patterns/03-layouts/block/_block.scss +++ b/src/patterns/03-layouts/block/_block.scss @@ -13,8 +13,8 @@ &.block-local-tasks-block { margin-bottom: 0; } - // Move block title to top of block, while preserving spacing underneath. - & > { + // On nodes, move block title to top of block, while preserving spacing underneath. + .node & > { h2:first-child, .uw-admin-label + h2 { margin-top: -0.25em; /* Using ems so it adjusts to font size. */ @@ -24,9 +24,9 @@ &:last-of-type { 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 { + // On nodes, move an initial header in copy text to top of block, while preserving spacing underneath, unless there was a block title.. + .node & .uw-admin-label + .contextual + .uw-copy-text, + .node & .uw-copy-text:first-child { .uw-copy-text__wrapper > :where(h2, h3, h4, h5, h6):first-child { margin-top: -0.25em; /* Using ems so it adjusts to font size. */ padding-top: 0;