Increase size of branding section if secondary navigation not used

This commit is contained in:
Tiago Noronha 2018-04-12 18:47:45 +01:00
parent 7dc2f23a73
commit 30d4977d72
2 changed files with 38 additions and 4 deletions

View file

@ -20,12 +20,12 @@
.site-branding {
display: block;
@include span(3 of 12);
@include span(12 of 12);
clear: both;
img {
height: auto;
max-width: 100%;
max-width: 230px;
max-height: none;
}
}
@ -33,8 +33,12 @@
.woocommerce-active {
.site-header {
.secondary-navigation {
@include span(6 of 12);
.site-branding {
@include span(9 of 12);
img {
max-width: 100%;
}
}
.site-search {
@ -54,6 +58,31 @@
}
}
.storefront-secondary-navigation {
.site-header {
.site-branding {
@include span(5 of 12);
}
.secondary-navigation {
@include span(last 7 of 12);
}
}
&.woocommerce-active {
.site-header {
.site-branding {
@include span(3 of 12);
}
.secondary-navigation {
@include span(6 of 12);
}
}
}
}
.site-branding {
.site-description {
margin-bottom: 0;

View file

@ -330,6 +330,11 @@ if ( ! class_exists( 'Storefront' ) ) :
$classes[] = 'has-post-thumbnail';
}
// Add class when Secondary Navigation is in use
if ( has_nav_menu( 'secondary' ) ) {
$classes[] = 'storefront-secondary-navigation';
}
return $classes;
}