Skip to content

Commit

Permalink
LIB-343 Update media caption layout, figure>image-style class
Browse files Browse the repository at this point in the history
  • Loading branch information
jtmcd75 committed Jun 17, 2024
1 parent 5c120ac commit 436bc4b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
8 changes: 5 additions & 3 deletions custom/themes/lib_unb_ca/src/scss/overrides/_media.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ figure {
padding-bottom: 0;
}

&.caption,
&.caption > figcaption {
display: block;
&:not(.image-style) {
&.caption,
&.caption > figcaption {
display: block;
}
}

&.caption:not(.img-thumbnail) {
Expand Down
20 changes: 12 additions & 8 deletions custom/themes/lib_unb_ca/src/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,31 @@ img.float-right,
margin-left: .5rem;
}
figure {
&.align-left {
margin-right: 1rem;
&.align-center,
&.align-left,
&.align-right {
.field--type-image {
margin: 0;
}

img {
margin: 0;
width: 100%;
}
}
&.align-left {
margin-right: 1rem;
}
&.align-right {
margin-left: 1rem;

img {
margin: 0;
}
}

figcaption {
color: $gray-700;
font-size: 95%;
line-height: 1.15rem;
margin-top: .5rem;
padding: 0.6rem 0.75rem!important;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
}

Expand Down

0 comments on commit 436bc4b

Please sign in to comment.