From 7443cd0a5d86a5d7e35c41bc69ddf553fe056afb Mon Sep 17 00:00:00 2001 From: Andy Cochran Date: Fri, 1 Jul 2016 20:44:44 -0400 Subject: [PATCH] fix centered columns flowing around uncentered columns --- scss/grid/_position.scss | 1 + test/visual/grid/centered-columns.html | 31 +++++++++++++++++++++----- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/scss/grid/_position.scss b/scss/grid/_position.scss index 886d20b7f..a832a1387 100644 --- a/scss/grid/_position.scss +++ b/scss/grid/_position.scss @@ -19,6 +19,7 @@ @else if $position == center { &, &:last-child:not(:first-child) { float: none; + clear: both; } margin-left: auto; margin-right: auto; diff --git a/test/visual/grid/centered-columns.html b/test/visual/grid/centered-columns.html index 8ee92b220..f92054924 100644 --- a/test/visual/grid/centered-columns.html +++ b/test/visual/grid/centered-columns.html @@ -10,24 +10,45 @@ +
+

Centered Columns

+
+
-

all these columns should be centered, even the last

+

All these grey columns should be centered, even the last one.

-

all these columns should be centered, even the last

+

All these grey columns should be centered, even the last one.

-

all these columns should be centered, even the last

+

All these grey columns should be centered, even the last one.

-

all these columns should be centered, even the last

+

All these grey columns should be centered, even the last one.

-

all these columns should be centered, even the last

+

All these grey columns should be centered, even the last one.

+
+
+ +

+ +
+
+

This blue column is not centered.

+
+
+

This pink column should be centered and clear the blue column.

+
+
+

This blue column is not centered.

+
+
+

This blue column is not centered.

-- 2.47.2