Skip to content

Commit

Permalink
allow single column span (#10)
Browse files Browse the repository at this point in the history
* allow single column span

* retreat

* restore demo

* update bemness
  • Loading branch information
gvonkoss authored Jul 24, 2018
1 parent edc791b commit b4a01c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ The grid does not require the sidebar to maintain its layout.
#### Layout Base
The markup below ↓ will generate the ascii grid above ↑.

The main content section will constrain its _immediate_ children to its first column, with the exception of `table`s and `aside`s.
The main content section will constrain its _immediate_ children to its first column, with the exception of `table`s and `aside`s.
If you want an element to span the full width of the main content area, you can apply the `o-layout__main__full-span` class to that element to achieve that effect.


If you want an element to span the full width of the main content area, you can apply the `o-layout__main--full-span` class to that element to achieve that effect.
_Note: `o-layout` styles tables to span two columns automatically. If you want a table to stick to a single column, you can apply_ `o-layout__main__single-span`, _instead. Every other element is styled to fit a single column._

```html
<div class="o-layout" data-o-component="o-layout">
Expand Down
9 changes: 7 additions & 2 deletions src/scss/_grid-areas.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,12 @@
@include oLayoutRule('right');
}

.#{$class}__main--full-span {
.#{$class}__main__single-span {
grid-column-end: 2;
}

.#{$class}__main--full-span,
.#{$class}__main__full-span {
grid-column-end: -1;
}
}
Expand Down Expand Up @@ -134,7 +139,7 @@
text-align: right;
margin-top: $_o-layout-gutter;
}

border-left: 2px solid oColorsGetPaletteColor('teal');
padding: 0;
text-align: left;
Expand Down

0 comments on commit b4a01c5

Please sign in to comment.