Skip to content

Commit

Permalink
Videomaker: Update Videomaker navigation (#5059)
Browse files Browse the repository at this point in the history
* Videomaker: Update navigation width

* Update font sizes

* change the jusificiation to be center

* add social links to the navigation

* prevent the navigation wrapping
  • Loading branch information
scruffian authored Nov 24, 2021
1 parent c1f51c9 commit dbd73c2
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
1 change: 1 addition & 0 deletions blockbase/sass/blocks/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
.wp-block-navigation-item {
align-items: flex-start;
}

.wp-block-navigation__responsive-container-content .has-child { // Needed for specificity to beat the navigation block CSS
.wp-block-navigation__submenu-container {
font-size: var(--wp--preset--font-size--normal);
Expand Down
14 changes: 13 additions & 1 deletion videomaker/assets/theme.css

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

2 changes: 1 addition & 1 deletion videomaker/block-template-parts/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<!-- wp:site-tagline /-->
</div>
<!-- /wp:group -->
<!-- wp:navigation {"overlayMenu":"always","__unstableLocation":"primary","className":"is-style-blockbase-navigation-improved-responsive","layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right","orientation":"horizontal"}} /-->
<!-- wp:navigation {"overlayMenu":"always","__unstableLocation":"primary","__unstableSocialLinks":"social","className":"is-style-blockbase-navigation-improved-responsive","layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right","orientation":"horizontal"}} /-->
</header>
<!-- /wp:group -->
14 changes: 13 additions & 1 deletion videomaker/sass/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@

.wp-block-navigation.is-style-blockbase-navigation-improved-responsive {
&.is-responsive .is-menu-open.wp-block-navigation__responsive-container {
font-size: var(--wp--preset--font-size--large);
font-weight: 200;

.wp-block-navigation__container {
row-gap: 1rem;
}

.wp-block-navigation__responsive-container-content { // Needed for specificity to beat the navigation block CSS
align-items: flex-start;
margin: 0 auto;
max-width: 800px; // This should match the content width

.wp-block-navigation-item {
row-gap: 0rem;
Expand All @@ -25,10 +30,17 @@
}
}
.wp-block-navigation__responsive-container-content {
justify-content: space-between;
flex-wrap: nowrap;
justify-content: center;
}
ul.wp-block-social-links {
padding-bottom: calc( var(--wp--custom--gap--vertical) * 2 );
}

.wp-block-navigation__responsive-container-content .has-child { // Needed for specificity to beat the navigation block CSS
.wp-block-navigation__submenu-container {
font-size: var(--wp--preset--font-size--medium);
}
}
}
}

0 comments on commit dbd73c2

Please sign in to comment.