Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Commit

Permalink
Merge pull request #1149 from colin-marshall/update-full-width-class
Browse files Browse the repository at this point in the history
Change the full-width template class to .main-content-full-width
  • Loading branch information
olefredrik authored Nov 9, 2017
2 parents d125515 + 6adaa28 commit 04d0de1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
4 changes: 2 additions & 2 deletions page-templates/page-full-width.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<?php get_template_part( 'template-parts/featured-image' ); ?>

<div class="main-wrap full-width">
<main class="main-content">
<div class="main-wrap">
<main class="main-content-full-width">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'template-parts/content', 'page' ); ?>
<?php comments_template(); ?>
Expand Down
28 changes: 11 additions & 17 deletions src/assets/scss/modules/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,36 @@
}

&.sidebar-left {

// Place the sidebar below main content on small screens ...
@include breakpoint(small) {
.main-content { order: 1; }
.sidebar { order: 2; }
}
@include breakpoint(small) {
.main-content { order: 1; }
.sidebar { order: 2; }
}

// ... and to the left on medium-up screens, when using the sidebar-left template
@include breakpoint(medium) {
.main-content { order: 2; }
.sidebar { order: 1; }
}
@include breakpoint(medium) {
.main-content { order: 2; }
.sidebar { order: 1; }
}
}

// Full width template
&.full-width {
.main-content {
@include xy-cell(12);
}
.main-content-full-width {
@include xy-cell(12);
}

// Default template
.main-content {

// Default template
@include breakpoint(small) {
@include xy-cell(12);
}

@include breakpoint(medium) {
@include xy-cell(8);
}

}

.sidebar {

@include breakpoint(small) {
@include xy-cell(12);
}
Expand Down

0 comments on commit 04d0de1

Please sign in to comment.