Skip to content

Commit

Permalink
left aligned buttons to text content on article pages (#7813)
Browse files Browse the repository at this point in the history
* left aligned buttons to text content on article pages

* buttons now wrapping if text is long

Co-authored-by: Daniel Miranda <daniel@mozillafoundation.org>
  • Loading branch information
danielfmiranda and Daniel Miranda authored Nov 9, 2021
1 parent b4d04d1 commit e0716fc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/sass/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ button,
.btn {
font-family: "Nunito Sans";
font-weight: $btn-font-weight;
white-space: nowrap;
white-space: normal;

@include set-text-size(18px, 22px);

Expand Down
9 changes: 9 additions & 0 deletions source/sass/wagtail/blocks/article-blocks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,12 @@
position: relative;
}
}

// left-aligning link button streamfields to text content
// since text content is 8-col instead of 10 like the available streamfields.
.article-page-content {
.linkbutton-block .streamfield-content {
@extend .col-md-8;
padding-left: 12px;
}
}
3 changes: 2 additions & 1 deletion source/sass/wagtail/blocks/link-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

.link-button {
display: block;
width: max-content;
width: 100%;
max-width: max-content;
}

0 comments on commit e0716fc

Please sign in to comment.