diff --git a/assets/stylesheets/shipyard/core/_grid.sass b/assets/stylesheets/shipyard/core/_grid.sass index cd04416a..d5ad52db 100644 --- a/assets/stylesheets/shipyard/core/_grid.sass +++ b/assets/stylesheets/shipyard/core/_grid.sass @@ -29,7 +29,7 @@ $widths: (auto, 5, 10, 15, 20, 25, 30, 33, 35, 40, 45, 50, 55, 60, 65, 66, 70, 7 @extend .container +responsive-padding(top bottom, $divisor: 1) -.col ++component('col') display: block position: relative flex-basis: 0 @@ -40,8 +40,12 @@ $widths: (auto, 5, 10, 15, 20, 25, 30, 33, 35, 40, 45, 50, 55, 60, 65, 66, 70, 7 &-container display: flex flex-wrap: wrap - +clearfix +responsive-margin(left right, $divisor: -2) + &-nowrap + +all-media-sizes + display: flex + flex-wrap: nowrap + +responsive-margin(left right, $divisor: -2) &-center float: none diff --git a/styleguide/_assets/css/views.sass b/styleguide/_assets/css/views.sass index d6b8ed74..e4608dc0 100644 --- a/styleguide/_assets/css/views.sass +++ b/styleguide/_assets/css/views.sass @@ -5,7 +5,7 @@ code @extend .code-inline div.highlighter-rouge & @extend .code-block - margin: 30px 0 + margin: 15px 0 hr +respond-to(margin, (x0: 30px 0, x1: 40px 0, x2: 50px 0)) diff --git a/styleguide/components/grid.md b/styleguide/components/grid.md index fd96f6d0..9ec5a2a9 100644 --- a/styleguide/components/grid.md +++ b/styleguide/components/grid.md @@ -1,7 +1,7 @@ --- title: Shipyard Grid description: The Shipyard grid is a percentage-based, flexbox grid and is entirely responsive. Each class needs the foundational `.col` class in order to function properly, and also should be contained inside the `.col-container` as well. -container_classes: col-container margin-top-xs margin-top-x1-sm margin-top-x2-md +container_classes: col-container margin-top-xs margin-top-x1-sm margin-top-x2-md margin-bottom-md box_classes: box-secondary text-light text-sm strong align-center example_flex_columns: [10,20,25,33,50] example_sizes: [5,10,15,20,25,30,33,35,40,45,50,55,60,65,66,70,75,80,85,90,95,100] @@ -101,7 +101,7 @@ example_offsets: [5,10,15,20,25,30,35,40,45,50,55,60,65,70,75] --- ### Responsive Columns `.col-{ n }-(x1..x4)` -

Useful when you want to build a grid that works for any size of screen.

+

Useful when you want to build a grid that works for any size of screen.

{% for i in (1..5) %} @@ -115,8 +115,9 @@ example_offsets: [5,10,15,20,25,30,35,40,45,50,55,60,65,70,75]
{% endfor %} + ```html -
+
@@ -124,3 +125,28 @@ example_offsets: [5,10,15,20,25,30,35,40,45,50,55,60,65,70,75]
``` + +--- + +### Take-Up-The-Rest Columns `.col-container-nowrap` +

This type of layout is useful in all kinds of scenarios, especially when you have the auto-sized column contains some kind of call-to-action.

+ +
+
+
Take-up-the-rest Column
+
+
+
Variable Column
+
+
+ +```html +
+
+ +
+
+ +
+
+```