Skip to content

Commit

Permalink
Header/Footer: Reorganize logo, tweak positioning.
Browse files Browse the repository at this point in the history
It was moved to `social-links.pcss` in 64629ca, but fits better in `logos.pcss`.
  • Loading branch information
iandunn committed Oct 12, 2021
1 parent d938d4f commit 367df2b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,4 @@
/* Create columns automatically, make them equal widths, wrap when needed. */
grid-template-columns: repeat( auto-fit, minmax(150px, 1fr) );
}

& .wp-block-image {
text-align: left;
}
}
27 changes: 27 additions & 0 deletions mu-plugins/blocks/global-header-footer/postcss/footer/logos.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
flex-wrap: nowrap;
}

& .wp-block-image {
text-align: left;
}

& .site-footer__wporg-logo-mark {
flex-basis: 65%;

Expand All @@ -25,4 +29,27 @@
flex-basis: 33%;
}
}

& .wp-block-image.site-footer__code_is_poetry {
flex-basis: 100%;
margin-top: 9px;
margin-bottom: 0;

@media (--tablet) {
& img {
position: absolute;
width: 188px;
height: 13px;
left: calc(50% - (188px / 2)); /* Align horizontally. Width must match width of the image. */

/*
* Align vertically with W logo and social links.
* This is intentionally not the exact center, since that wouldn't appear perfectly aligned to
* the human eye. It needs to be a little off-center to appear centered.
* Must match the height of the image.
*/
top: calc( 13px / 1.5 );
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
min-width: 100px;

@media (--tablet) {
top: -11px; /* Align with W logo. */
justify-content: flex-end;
flex-basis: 33%;
order: 3;
Expand All @@ -28,19 +27,4 @@
width: 29px;
height: 29px;
}

& .wp-block-image.site-footer__code_is_poetry {
flex-basis: 100%;
margin-top: 9px;
margin-bottom: 0;

@media (--tablet) {
position: absolute;
top: 0;
left: calc(50% - (188px / 2)); /* Must match width of the image. */
width: 188px;
height: 13px;
margin-top: 3px;
}
}
}

0 comments on commit 367df2b

Please sign in to comment.