From 551692a20892b9f0d7c02f111b33e3d507625cf8 Mon Sep 17 00:00:00 2001 From: Alex Block Date: Thu, 15 Dec 2016 13:17:56 -0600 Subject: [PATCH] Nth of type Some Shopify Apps modify the grid using script tags injected between divs. nth-child does include script tags whereas nth-of-type does not. --- assets/timber.scss.liquid | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/assets/timber.scss.liquid b/assets/timber.scss.liquid index d2ce3e08a..74d3be9cc 100755 --- a/assets/timber.scss.liquid +++ b/assets/timber.scss.liquid @@ -494,21 +494,21 @@ $class-type: unquote("."); /*================ Clearfix helper on uniform grids ================*/ @mixin clearfix-helper($namespace:"") { .grid-uniform { - #{$class-type}#{$namespace}one-half:nth-child(2n+1), - #{$class-type}#{$namespace}one-third:nth-child(3n+1), - #{$class-type}#{$namespace}one-quarter:nth-child(4n+1), - #{$class-type}#{$namespace}one-fifth:nth-child(5n+1), - #{$class-type}#{$namespace}one-sixth:nth-child(6n+1), - #{$class-type}#{$namespace}two-sixths:nth-child(3n+1), - #{$class-type}#{$namespace}three-sixths:nth-child(2n+1), - #{$class-type}#{$namespace}two-eighths:nth-child(4n+1), - #{$class-type}#{$namespace}four-eighths:nth-child(2n+1), - #{$class-type}#{$namespace}five-tenths:nth-child(2n+1), - #{$class-type}#{$namespace}one-twelfth:nth-child(12n+1), - #{$class-type}#{$namespace}two-twelfths:nth-child(6n+1), - #{$class-type}#{$namespace}three-twelfths:nth-child(4n+1), - #{$class-type}#{$namespace}four-twelfths:nth-child(3n+1), - #{$class-type}#{$namespace}six-twelfths:nth-child(2n+1) { clear: both; } + #{$class-type}#{$namespace}one-half:nth-of-type(2n+1), + #{$class-type}#{$namespace}one-third:nth-of-type(3n+1), + #{$class-type}#{$namespace}one-quarter:nth-of-type(4n+1), + #{$class-type}#{$namespace}one-fifth:nth-of-type(5n+1), + #{$class-type}#{$namespace}one-sixth:nth-of-type(6n+1), + #{$class-type}#{$namespace}two-sixths:nth-of-type(3n+1), + #{$class-type}#{$namespace}three-sixths:nth-of-type(2n+1), + #{$class-type}#{$namespace}two-eighths:nth-of-type(4n+1), + #{$class-type}#{$namespace}four-eighths:nth-of-type(2n+1), + #{$class-type}#{$namespace}five-tenths:nth-of-type(2n+1), + #{$class-type}#{$namespace}one-twelfth:nth-of-type(12n+1), + #{$class-type}#{$namespace}two-twelfths:nth-of-type(6n+1), + #{$class-type}#{$namespace}three-twelfths:nth-of-type(4n+1), + #{$class-type}#{$namespace}four-twelfths:nth-of-type(3n+1), + #{$class-type}#{$namespace}six-twelfths:nth-of-type(2n+1) { clear: both; } } }