mirror of
https://github.com/woocommerce/storefront.git
synced 2025-08-20 04:00:29 +08:00
Increase size of branding section if secondary navigation not used
This commit is contained in:
parent
7dc2f23a73
commit
30d4977d72
2 changed files with 38 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue