Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Videomaker: Navigation styles #4876

Merged
merged 13 commits into from
Oct 20, 2021
32 changes: 32 additions & 0 deletions videomaker/assets/theme.css

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

5 changes: 0 additions & 5 deletions videomaker/child-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,6 @@
"fontFamily": "var(--wp--preset--font-family--inter)"
}
},
"core/navigation": {
"typography": {
"textTransform": "uppercase"
}
},
"core/navigation-link": {
"color": {
"background": "transparent",
Expand Down
2 changes: 1 addition & 1 deletion videomaker/inc/patterns/background-video.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<!-- wp:column {"verticalAlignment":"center"} -->
<div class="wp-block-column is-vertically-aligned-center">
<!-- wp:navigation {"itemsJustification":"right","isResponsive":true,"__unstableLocation":"primary"} /-->
<!-- wp:navigation {"itemsJustification":"right","isResponsive":true,"__unstableLocation":"primary","style":{"typography":{"textTransform":"uppercase"}}} /-->
</div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
Expand Down
2 changes: 1 addition & 1 deletion videomaker/inc/patterns/full-width-homepage.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<!-- /wp:column -->

<!-- wp:column {"verticalAlignment":"center"} -->
<div class="wp-block-column is-vertically-aligned-center"><!-- wp:navigation {"itemsJustification":"right","isResponsive":true,"__unstableLocation":"primary"} /--></div>
<div class="wp-block-column is-vertically-aligned-center"><!-- wp:navigation {"itemsJustification":"right","isResponsive":true,"__unstableLocation":"primary","style":{"typography":{"textTransform":"uppercase"}}} /--></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<h3 style="font-weight:300">' . esc_html__( 'Jonah is Creative Director of Hano, a production studio that specializes in combining storytelling with visual design.', 'videomaker' ) . '</h3>
<!-- /wp:heading -->

<!-- wp:navigation {"orientation":"vertical","__unstableLocation":"primary"} /-->
<!-- wp:navigation {"orientation":"vertical","__unstableLocation":"primary","style":{"typography":{"textTransform":"uppercase"}}} /-->

</div>
<!-- /wp:column -->
Expand Down
35 changes: 35 additions & 0 deletions videomaker/sass/_navigation.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,39 @@
// Needed until this is merged: https://github.com/WordPress/gutenberg/issues/35040
.is-vertical.items-justified-right ul.wp-block-navigation__container {
align-items: flex-end;
}

.wp-block-navigation.is-style-blockbase-navigation-improved-responsive {
&.is-responsive .is-menu-open {
.wp-block-navigation__container {
align-items: center !important;
scruffian marked this conversation as resolved.
Show resolved Hide resolved
row-gap: 1rem !important;
}
.wp-block-navigation-item {
align-items: center !important;
row-gap: 0.8rem;

&.current-menu-item > a {
text-decoration: underline;
}
&.has-child {
.wp-block-navigation__submenu-container {
padding-left: 0 !important;
padding-right: 0;
}
}
&.has-child:not(.current-menu-item) {
.wp-block-navigation__submenu-container {
display: none;
}
}
}
.wp-block-navigation__responsive-container-content {
justify-content: space-between;
}
ul.wp-block-social-links {
justify-content: center;
padding-bottom: calc( var(--wp--custom--gap--vertical) * 2 );
}
}
}
3 changes: 1 addition & 2 deletions videomaker/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,7 @@
},
"core/navigation": {
"typography": {
"fontSize": "var(--wp--preset--font-size--normal)",
"textTransform": "uppercase"
"fontSize": "var(--wp--preset--font-size--normal)"
}
},
"core/post-title": {
Expand Down