From d32505e3b2fd8f505fee356144d4d99cbe3b0caa Mon Sep 17 00:00:00 2001 From: jlukic Date: Thu, 11 Dec 2014 12:01:11 -0500 Subject: [PATCH] Fix issue with responsive column widths --- src/definitions/collections/grid.less | 199 +++++++++++----------- src/themes/default/globals/site.variables | 1 + 2 files changed, 101 insertions(+), 99 deletions(-) diff --git a/src/definitions/collections/grid.less b/src/definitions/collections/grid.less index 660625e8d..c02a19cea 100755 --- a/src/definitions/collections/grid.less +++ b/src/definitions/collections/grid.less @@ -171,7 +171,7 @@ margin-right: 0em; } } -@media only screen and (min-width: @tabletBreakpoint) { +@media only screen and (min-width: @tabletBreakpoint ) { .ui.page.grid { width: @tabletWidth; margin-left: @tabletMargin; @@ -443,106 +443,107 @@ -----------------------*/ /* Mobile Sizing Combinations */ -.ui.grid > .row > [class*="one wide mobile"].column, -.ui.grid > .column.row > [class*="one wide mobile"].column, -.ui.grid > [class*="one wide mobile"].column, -.ui.column.grid > [class*="one wide mobile"].column { - width: @oneWide !important; -} -.ui.grid > .row > [class*="two wide mobile"].column, -.ui.grid > .column.row > [class*="two wide mobile"].column, -.ui.grid > [class*="two wide mobile"].column, -.ui.column.grid > [class*="two wide mobile"].column { - width: @twoWide !important; -} -.ui.grid > .row > [class*="three wide mobile"].column, -.ui.grid > .column.row > [class*="three wide mobile"].column, -.ui.grid > [class*="three wide mobile"].column, -.ui.column.grid > [class*="three wide mobile"].column { - width: @threeWide !important; -} -.ui.grid > .row > [class*="four wide mobile"].column, -.ui.grid > .column.row > [class*="four wide mobile"].column, -.ui.grid > [class*="four wide mobile"].column, -.ui.column.grid > [class*="four wide mobile"].column { - width: @fourWide !important; -} -.ui.grid > .row > [class*="five wide mobile"].column, -.ui.grid > .column.row > [class*="five wide mobile"].column, -.ui.grid > [class*="five wide mobile"].column, -.ui.column.grid > [class*="five wide mobile"].column { - width: @fiveWide !important; -} -.ui.grid > .row > [class*="six wide mobile"].column, -.ui.grid > .column.row > [class*="six wide mobile"].column, -.ui.grid > [class*="six wide mobile"].column, -.ui.column.grid > [class*="six wide mobile"].column { - width: @sixWide !important; -} -.ui.grid > .row > [class*="seven wide mobile"].column, -.ui.grid > .column.row > [class*="seven wide mobile"].column, -.ui.grid > [class*="seven wide mobile"].column, -.ui.column.grid > [class*="seven wide mobile"].column { - width: @sevenWide !important; -} -.ui.grid > .row > [class*="eight wide mobile"].column, -.ui.grid > .column.row > [class*="eight wide mobile"].column, -.ui.grid > [class*="eight wide mobile"].column, -.ui.column.grid > [class*="eight wide mobile"].column { - width: @eightWide !important; -} -.ui.grid > .row > [class*="nine wide mobile"].column, -.ui.grid > .column.row > [class*="nine wide mobile"].column, -.ui.grid > [class*="nine wide mobile"].column, -.ui.column.grid > [class*="nine wide mobile"].column { - width: @nineWide !important; -} -.ui.grid > .row > [class*="ten wide mobile"].column, -.ui.grid > .column.row > [class*="ten wide mobile"].column, -.ui.grid > [class*="ten wide mobile"].column, -.ui.column.grid > [class*="ten wide mobile"].column { - width: @tenWide !important; -} -.ui.grid > .row > [class*="eleven wide mobile"].column, -.ui.grid > .column.row > [class*="eleven wide mobile"].column, -.ui.grid > [class*="eleven wide mobile"].column, -.ui.column.grid > [class*="eleven wide mobile"].column { - width: @elevenWide !important; -} -.ui.grid > .row > [class*="twelve wide mobile"].column, -.ui.grid > .column.row > [class*="twelve wide mobile"].column, -.ui.grid > [class*="twelve wide mobile"].column, -.ui.column.grid > [class*="twelve wide mobile"].column { - width: @twelveWide !important; -} -.ui.grid > .row > [class*="thirteen wide mobile"].column, -.ui.grid > .column.row > [class*="thirteen wide mobile"].column, -.ui.grid > [class*="thirteen wide mobile"].column, -.ui.column.grid > [class*="thirteen wide mobile"].column { - width: @thirteenWide !important; -} -.ui.grid > .row > [class*="fourteen wide mobile"].column, -.ui.grid > .column.row > [class*="fourteen wide mobile"].column, -.ui.grid > [class*="fourteen wide mobile"].column, -.ui.column.grid > [class*="fourteen wide mobile"].column { - width: @fourteenWide !important; -} -.ui.grid > .row > [class*="fifteen wide mobile"].column, -.ui.grid > .column.row > [class*="fifteen wide mobile"].column, -.ui.grid > [class*="fifteen wide mobile"].column, -.ui.column.grid > [class*="fifteen wide mobile"].column { - width: @fifteenWide !important; -} -.ui.grid > .row > [class*="sixteen wide mobile"].column, -.ui.grid > .column.row > [class*="sixteen wide mobile"].column, -.ui.grid > [class*="sixteen wide mobile"].column, -.ui.column.grid > [class*="sixteen wide mobile"].column { - width: @sixteenWide !important; +@media only screen and (min-width: @mobileBreakpoint) and (max-width: @largestMobileScreen) { + .ui.grid > .row > [class*="one wide mobile"].column, + .ui.grid > .column.row > [class*="one wide mobile"].column, + .ui.grid > [class*="one wide mobile"].column, + .ui.column.grid > [class*="one wide mobile"].column { + width: @oneWide !important; + } + .ui.grid > .row > [class*="two wide mobile"].column, + .ui.grid > .column.row > [class*="two wide mobile"].column, + .ui.grid > [class*="two wide mobile"].column, + .ui.column.grid > [class*="two wide mobile"].column { + width: @twoWide !important; + } + .ui.grid > .row > [class*="three wide mobile"].column, + .ui.grid > .column.row > [class*="three wide mobile"].column, + .ui.grid > [class*="three wide mobile"].column, + .ui.column.grid > [class*="three wide mobile"].column { + width: @threeWide !important; + } + .ui.grid > .row > [class*="four wide mobile"].column, + .ui.grid > .column.row > [class*="four wide mobile"].column, + .ui.grid > [class*="four wide mobile"].column, + .ui.column.grid > [class*="four wide mobile"].column { + width: @fourWide !important; + } + .ui.grid > .row > [class*="five wide mobile"].column, + .ui.grid > .column.row > [class*="five wide mobile"].column, + .ui.grid > [class*="five wide mobile"].column, + .ui.column.grid > [class*="five wide mobile"].column { + width: @fiveWide !important; + } + .ui.grid > .row > [class*="six wide mobile"].column, + .ui.grid > .column.row > [class*="six wide mobile"].column, + .ui.grid > [class*="six wide mobile"].column, + .ui.column.grid > [class*="six wide mobile"].column { + width: @sixWide !important; + } + .ui.grid > .row > [class*="seven wide mobile"].column, + .ui.grid > .column.row > [class*="seven wide mobile"].column, + .ui.grid > [class*="seven wide mobile"].column, + .ui.column.grid > [class*="seven wide mobile"].column { + width: @sevenWide !important; + } + .ui.grid > .row > [class*="eight wide mobile"].column, + .ui.grid > .column.row > [class*="eight wide mobile"].column, + .ui.grid > [class*="eight wide mobile"].column, + .ui.column.grid > [class*="eight wide mobile"].column { + width: @eightWide !important; + } + .ui.grid > .row > [class*="nine wide mobile"].column, + .ui.grid > .column.row > [class*="nine wide mobile"].column, + .ui.grid > [class*="nine wide mobile"].column, + .ui.column.grid > [class*="nine wide mobile"].column { + width: @nineWide !important; + } + .ui.grid > .row > [class*="ten wide mobile"].column, + .ui.grid > .column.row > [class*="ten wide mobile"].column, + .ui.grid > [class*="ten wide mobile"].column, + .ui.column.grid > [class*="ten wide mobile"].column { + width: @tenWide !important; + } + .ui.grid > .row > [class*="eleven wide mobile"].column, + .ui.grid > .column.row > [class*="eleven wide mobile"].column, + .ui.grid > [class*="eleven wide mobile"].column, + .ui.column.grid > [class*="eleven wide mobile"].column { + width: @elevenWide !important; + } + .ui.grid > .row > [class*="twelve wide mobile"].column, + .ui.grid > .column.row > [class*="twelve wide mobile"].column, + .ui.grid > [class*="twelve wide mobile"].column, + .ui.column.grid > [class*="twelve wide mobile"].column { + width: @twelveWide !important; + } + .ui.grid > .row > [class*="thirteen wide mobile"].column, + .ui.grid > .column.row > [class*="thirteen wide mobile"].column, + .ui.grid > [class*="thirteen wide mobile"].column, + .ui.column.grid > [class*="thirteen wide mobile"].column { + width: @thirteenWide !important; + } + .ui.grid > .row > [class*="fourteen wide mobile"].column, + .ui.grid > .column.row > [class*="fourteen wide mobile"].column, + .ui.grid > [class*="fourteen wide mobile"].column, + .ui.column.grid > [class*="fourteen wide mobile"].column { + width: @fourteenWide !important; + } + .ui.grid > .row > [class*="fifteen wide mobile"].column, + .ui.grid > .column.row > [class*="fifteen wide mobile"].column, + .ui.grid > [class*="fifteen wide mobile"].column, + .ui.column.grid > [class*="fifteen wide mobile"].column { + width: @fifteenWide !important; + } + .ui.grid > .row > [class*="sixteen wide mobile"].column, + .ui.grid > .column.row > [class*="sixteen wide mobile"].column, + .ui.grid > [class*="sixteen wide mobile"].column, + .ui.column.grid > [class*="sixteen wide mobile"].column { + width: @sixteenWide !important; + } } - /* Tablet Sizing Combinations */ -@media only screen and (min-width: @tabletBreakpoint) { +@media only screen and (min-width: @tabletBreakpoint) and (max-width: @largestTabletScreen) { .ui.grid > .row > [class*="one wide tablet"].column, .ui.grid > .column.row > [class*="one wide tablet"].column, .ui.grid > [class*="one wide tablet"].column, @@ -742,7 +743,7 @@ } /* Large Monitor Sizing Combinations */ -@media only screen and (min-width: @largeMonitorBreakpoint) { +@media only screen and (min-width: @largeMonitorBreakpoint) and (max-width: @largestLargeMonitor){ .ui.grid > .row > [class*="one wide large screen"].column, .ui.grid > .column.row > [class*="one wide large screen"].column, .ui.grid > [class*="one wide large screen"].column, diff --git a/src/themes/default/globals/site.variables b/src/themes/default/globals/site.variables index 0d4f41845..3107f62ae 100644 --- a/src/themes/default/globals/site.variables +++ b/src/themes/default/globals/site.variables @@ -392,6 +392,7 @@ /* Responsive */ @largestMobileScreen : (@tabletBreakpoint - 1px); @largestTabletScreen : (@computerBreakpoint - 1px); +@largestLargeMonitor : (@widescreenMonitorBreakpoint - 1px); /* Columns */ @oneWide : (1 / @columnCount * 100%);