Skip to content

Commit

Permalink
Merge pull request #9682 from iamtakashi/twentysixteen
Browse files Browse the repository at this point in the history
[2.4] Edit for Twnety Sixteen
  • Loading branch information
mikejolley committed Nov 23, 2015
2 parents 8684ea0 + d88ba80 commit 4b47f98
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 4 deletions.
2 changes: 1 addition & 1 deletion assets/css/woocommerce-layout.css

Large diffs are not rendered by default.

57 changes: 57 additions & 0 deletions assets/css/woocommerce-layout.scss
Expand Up @@ -443,3 +443,60 @@
}
}
}

/**
* Twenty Sixteen specific styles
*/
.twentysixteen {
.site-main {
margin-right: 7.6923%;
margin-left: 7.6923%;
}

.entry-summary {
margin-right: 0;
margin-left: 0;
}
}

#content {
.twentysixteen {
div.product {
div.images,
div.summary {
width: 46.42857%;
}
}
}
}

@media screen and (min-width: 44.375em) {
.twentysixteen {
.site-main {
margin-right: 23.0769%;
}
}
}

@media screen and (min-width: 56.875em) {
.twentysixteen {
.site-main {
margin-right: 0;
margin-left: 0;
}
}

.no-sidebar {
.twentysixteen {
.site-main {
margin-right: 15%;
margin-left: 15%;
}

.entry-summary {
margin-right: 0;
margin-left: 0;
}
}
}
}
2 changes: 1 addition & 1 deletion assets/css/woocommerce.css

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions assets/css/woocommerce.scss
Expand Up @@ -1960,3 +1960,23 @@ p.demo_store {
}
}
}

/**
* Twenty Sixteen specific styles
*/
body:not(.search-results) {
.twentysixteen {
.entry-summary {
color: inherit;
font-size: inherit;
line-height: inherit;
}
}
}

.twentysixteen {
.price ins {
background: inherit;
color: inherit;
}
}
2 changes: 1 addition & 1 deletion includes/wc-core-functions.php
Expand Up @@ -689,7 +689,7 @@ function wc_ms_protect_download_rewite_rules( $rewrite ) {
* @return string[]
*/
function wc_get_core_supported_themes() {
return array( 'twentyfifteen', 'twentyfourteen', 'twentythirteen', 'twentyeleven', 'twentytwelve', 'twentyten' );
return array( 'twentysixteen', 'twentyfifteen', 'twentyfourteen', 'twentythirteen', 'twentyeleven', 'twentytwelve', 'twentyten' );
}

/**
Expand Down
3 changes: 3 additions & 0 deletions templates/global/wrapper-end.php
Expand Up @@ -38,6 +38,9 @@
case 'twentyfifteen' :
echo '</div></div>';
break;
case 'twentysixteen' :
echo '</div></main>';
break;
default :
echo '</div></div>';
break;
Expand Down
3 changes: 3 additions & 0 deletions templates/global/wrapper-start.php
Expand Up @@ -37,6 +37,9 @@
case 'twentyfifteen' :
echo '<div id="primary" role="main" class="content-area twentyfifteen"><div id="main" class="site-main t15wc">';
break;
case 'twentysixteen' :
echo '<div id="primary" class="content-area twentysixteen"><main id="main" class="site-main" role="main">';
break;
default :
echo '<div id="container"><div id="content" role="main">';
break;
Expand Down
2 changes: 1 addition & 1 deletion tests/unit-tests/util/core-functions.php
Expand Up @@ -135,7 +135,7 @@ public function test_wc_get_log_file_path() {
*/
public function test_wc_get_core_supported_themes() {

$expected_themes = array( 'twentyfifteen', 'twentyfourteen', 'twentythirteen', 'twentyeleven', 'twentytwelve', 'twentyten' );
$expected_themes = array( 'twentysixteen', 'twentyfifteen', 'twentyfourteen', 'twentythirteen', 'twentyeleven', 'twentytwelve', 'twentyten' );

$this->assertEquals( $expected_themes, wc_get_core_supported_themes() );
}
Expand Down

0 comments on commit 4b47f98

Please sign in to comment.