Skip to content

Commit

Permalink
Global header, local nav: Make the logo bigger (#649)
Browse files Browse the repository at this point in the history
* Increase logo size, decrease global header size

* Local navigation: Increase logo size on scrolling nav bar
  • Loading branch information
ryelle committed Sep 9, 2024
1 parent 38bf9c2 commit 7da84bc
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 40 deletions.
17 changes: 4 additions & 13 deletions mu-plugins/blocks/global-header-footer/postcss/header/header.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,17 @@ html {
padding-left: var(--wp--style--block-gap);
padding-right: var(--wp--style--block-gap);
margin: 0;

@media (--tablet) {
padding-top: 33px;
padding-bottom: 33px;
}
}

& .global-header__search,
& .global-header__navigation {
padding: 0;

& .wp-block-navigation__responsive-container-open {

/* Magic numbers to center the 24px icon in 60px height. */
padding: 18px 16px 18px;

@media (--tablet) {
padding-top: 37px;
padding-bottom: 37px;
}
padding-top: calc((var(--wp-global-header-height) - 24px) / 2);
padding-right: 16px;
padding-bottom: calc((var(--wp-global-header-height) - 24px) / 2);
padding-left: 16px;
}
}

Expand Down
14 changes: 2 additions & 12 deletions mu-plugins/blocks/global-header-footer/postcss/header/logos.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,10 @@
& .wp-block-image > a {
display: inline-flex;
box-sizing: content-box;
height: 27px;
padding: 16px var(--wp--style--block-gap);
height: 30px;
padding: calc((var(--wp-global-header-height) - 30px) / 2) var(--wp--style--block-gap);
color: var(--wp-global-header--text-color);

@media (--tablet) {
padding-top: 31px;
padding-bottom: 32px;
}

@media (--short-screen) {
padding-bottom: 16px;
padding-top: 16px;
}

&:hover {
background-color: var(--wp-global-header--background-color--hover);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@
}

@media (--tablet) {
padding-bottom: calc(33px - var(--active-menu-item-border-height, 0px));
padding-top: 33px;
padding-left: calc(var(--wp--style--block-gap) / 2);
padding-top: calc((var(--wp-global-header-height) - 24px) / 2);
padding-right: calc(var(--wp--style--block-gap) / 2);
padding-bottom: calc((var(--wp-global-header-height) - 24px) / 2 - var(--active-menu-item-border-height, 0px));
padding-left: calc(var(--wp--style--block-gap) / 2);
}

@media (--short-screen) {
Expand Down
13 changes: 2 additions & 11 deletions mu-plugins/blocks/global-header-footer/postcss/header/search.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,8 @@

& .wp-block-navigation__responsive-container-open,
& .wp-block-navigation__responsive-container-close {

@media (--tablet) {
padding-top: 33px;
padding-bottom: 33px;
}

@media (--short-screen) {
padding-bottom: 20px;
padding-top: 16px;
background-position: center;
}
padding-top: calc((var(--wp-global-header-height) - 24px) / 2);
padding-bottom: calc((var(--wp-global-header-height) - 24px) / 2);

&:focus-visible {
outline: none;
Expand Down
8 changes: 7 additions & 1 deletion mu-plugins/blocks/local-navigation-bar/postcss/style.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@
top: -5px;
left: 0;
opacity: 0;
padding: 16px var(--wp--style--block-gap);
padding: calc(var(--wp--custom--local-navigation-bar--spacing--height) / 2 - 15px) var(--wp--style--block-gap);
padding-left: calc(var(--wp--style--block-gap) + 5px);
transition: all 0.2s ease-in-out;
visibility: hidden;
box-sizing: content-box;
width: 30px;

& a {
display: block;
Expand All @@ -81,6 +84,9 @@

& svg {
fill: currentcolor;
display: block;
height: auto;
width: 100%;
}
}

Expand Down

0 comments on commit 7da84bc

Please sign in to comment.