Skip to content

Commit

Permalink
Only modify image size as opposed to entire image group
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Darby committed Feb 7, 2020
1 parent 7a98075 commit 0d90b91
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 30 deletions.
2 changes: 1 addition & 1 deletion css/editor-style.min.css

Large diffs are not rendered by default.

39 changes: 27 additions & 12 deletions css/gutenberg.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/gutenberg.min.css

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

2 changes: 1 addition & 1 deletion css/style.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion homepages/assets/css/single.min.css

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

49 changes: 35 additions & 14 deletions less/inc/blocks.less
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,44 @@
}
}
&.alignfull {
figcaption {
// Constrain caption width within Largo's main column
// https://github.com/INN/largo/issues/1773
width: 100%;
margin-left: 0%;
transform: unset;
max-width: 100%;
&:not(.navis-slideshow) {
.classic & {
}
.normal & {
padding-left: ~"calc( 2.5vw + 17.021276594%)";
padding-right: ~"calc( 2.5vw + 17.021276594%)";
@media @tabletDown {
padding-left: ~"calc( 2.5vw + 6.38297872% )";
padding-right: ~"calc( 2.5vw + 6.38297872% )";
}
@media @mobile {
padding-left: 2.5vw;
padding-right: 2.5vw;
img {

// because #page does not have box-sizing: border-box but does have padding 0 2.5%
// 1170px * 1.05 = 1228.5px
//
// 1170px: the max-width of #page;
// 2.5vw: padding-left and padding-right on #page when #page is whole width of viewport
// 24px: padding-left on #sidebar.widget
// 2.12765957%: margin-left on #sidebar since it is a .span4
// 1170px * 2.12765957%: acceptable bleed from #content into the gutter of the sidebar, at that viewport width
// 95vw * 2.12765957%: acceptable bleed, below that viewport width
@media ( min-width: 1229px ) {
width: ~"calc( 100% + ( 0.5 * ( 100vw - 1170px ) ) + ( 1170px * 0.0212765957 ) )"; // the column width plus the left margin on #page, plus the bleed figure
margin-left: ~"calc( -0.5 * ( 100vw - 1170px ) )"; // the left margin on #page, as a negative.
transform: none;
}
@media ( max-width: 1228px ) {
width: ~"calc( 100% + 2.5vw + ( 95vw * 0.0212765957 ) )"; // the column width plus the left margin on #page, plus the bleed figure
margin-left: -2.5vw; // the left margin on #page, as a negative.
transform: none;
}
@media ( max-width: 768px ) {
width: 100vw;
}
}
}
img {
width: 100vw;
margin-left: 50%;
transform: translateX(-50%);
max-width: none;
}
}
}
}
Expand Down

0 comments on commit 0d90b91

Please sign in to comment.