Browse Source

Add variables for largest screen size, instead of using breakpoint minus 1pixel

pull/1129/head
jlukic 10 years ago
parent
commit
37be648e81
4 changed files with 22 additions and 19 deletions
  1. 22
      src/definitions/collections/grid.less
  2. 10
      src/definitions/modules/modal.less
  3. 6
      src/definitions/views/card.less
  4. 3
      src/themes/packages/default/globals/site.variables

22
src/definitions/collections/grid.less

@ -139,35 +139,35 @@ body > .ui.grid:not(.page) {
margin-right: @computerGutter; margin-right: @computerGutter;
} }
@media only screen and (max-width : (@tabletBreakpoint - 1)) {
@media only screen and (max-width: (@largestMobileScreen)) {
.ui.page.grid { .ui.page.grid {
width: @mobileWidth; width: @mobileWidth;
margin-left: @mobileGutter; margin-left: @mobileGutter;
margin-right: @mobileGutter; margin-right: @mobileGutter;
} }
} }
@media only screen and (min-width : @tabletBreakpoint) {
@media only screen and (min-width: @tabletBreakpoint) {
.ui.page.grid { .ui.page.grid {
width: @tabletWidth; width: @tabletWidth;
margin-left: @tabletGutter; margin-left: @tabletGutter;
margin-right: @tabletGutter; margin-right: @tabletGutter;
} }
} }
@media only screen and (min-width : @computerBreakpoint) {
@media only screen and (min-width: @computerBreakpoint) {
.ui.page.grid { .ui.page.grid {
width: @computerWidth; width: @computerWidth;
margin-left: @computerGutter; margin-left: @computerGutter;
margin-right: @computerGutter; margin-right: @computerGutter;
} }
} }
@media only screen and (min-width : @largeMonitorBreakpoint) {
@media only screen and (min-width: @largeMonitorBreakpoint) {
.ui.page.grid { .ui.page.grid {
width: @largeMonitorWidth; width: @largeMonitorWidth;
margin-left: @largeMonitorGutter; margin-left: @largeMonitorGutter;
margin-right: @largeMonitorGutter; margin-right: @largeMonitorGutter;
} }
} }
@media only screen and (min-width : @widescreenMonitorBreakpoint) {
@media only screen and (min-width: @widescreenMonitorBreakpoint) {
.ui.page.grid { .ui.page.grid {
width: @widescreenMonitorWidth; width: @widescreenMonitorWidth;
margin-left: @widescreenMonitorGutter; margin-left: @widescreenMonitorGutter;
@ -670,7 +670,7 @@ body > .ui.grid:not(.page) {
-----------------------*/ -----------------------*/
/* Mobile Only Hide */ /* Mobile Only Hide */
@media only screen and ( max-width : (@tabletBreakpoint - 1px) ) {
@media only screen and ( max-width: @largestMobileScreen ) {
.ui.tablet:not(.mobile).only.grid, .ui.tablet:not(.mobile).only.grid,
.ui.grid > .tablet:not(.mobile).only.row, .ui.grid > .tablet:not(.mobile).only.row,
.ui.grid > .tablet:not(.mobile).only.column, .ui.grid > .tablet:not(.mobile).only.column,
@ -685,7 +685,7 @@ body > .ui.grid:not(.page) {
} }
} }
/* Tablet Only Hide */ /* Tablet Only Hide */
@media only screen and (min-width: (@tabletBreakpoint)) and (max-width: (@computerBreakpoint - 1px) ) {
@media only screen and (min-width: (@tabletBreakpoint)) and (max-width: @largestTabletScreen ) {
.ui.mobile:not(.tablet).only.grid, .ui.mobile:not(.tablet).only.grid,
.ui.grid > .mobile:not(.tablet).only.row, .ui.grid > .mobile:not(.tablet).only.row,
.ui.grid > .mobile:not(.tablet).only.column, .ui.grid > .mobile:not(.tablet).only.column,
@ -701,7 +701,7 @@ body > .ui.grid:not(.page) {
} }
/* Computer Only Hide */ /* Computer Only Hide */
@media only screen and ( max-width : (@computerBreakpoint - 1px) ) {
@media only screen and ( min-width: (@computerBreakpoint) ) {
.ui.mobile:not(.computer).only.grid, .ui.mobile:not(.computer).only.grid,
.ui.grid > .mobile:not(.computer).only.row, .ui.grid > .mobile:not(.computer).only.row,
.ui.grid > .mobile:not(.computer).only.column, .ui.grid > .mobile:not(.computer).only.column,
@ -722,7 +722,7 @@ body > .ui.grid:not(.page) {
/* Mobily Only */ /* Mobily Only */
@media only screen and (max-width : (@tabletBreakpoint - 1px)) {
@media only screen and (max-width: @largestMobileScreen) {
.ui.doubling.grid > .row { .ui.doubling.grid > .row {
display: inline; display: inline;
} }
@ -792,7 +792,7 @@ body > .ui.grid:not(.page) {
} }
/* Tablet Only */ /* Tablet Only */
@media only screen and (min-width : @tabletBreakpoint) and (max-width : (@computerBreakpoint - 1px)) {
@media only screen and (min-width: @tabletBreakpoint) and (max-width: @largestTabletScreen) {
.ui.doubling.grid > .row { .ui.doubling.grid > .row {
display: inline; display: inline;
} }
@ -865,7 +865,7 @@ body > .ui.grid:not(.page) {
Stackable Stackable
--------------------*/ --------------------*/
@media only screen and (max-width : (@tabletBreakpoint - 1px)) {
@media only screen and (max-width: @largestMobileScreen) {
.ui.stackable.grid { .ui.stackable.grid {
display: block !important; display: block !important;
padding: 0em; padding: 0em;

10
src/definitions/modules/modal.less

@ -155,7 +155,7 @@
--------------------*/ --------------------*/
/* Modal Width */ /* Modal Width */
@media only screen and (max-width : (@tabletBreakpoint - 1px)) {
@media only screen and (max-width : @largestMobileScreen) {
.ui.modal { .ui.modal {
width: @mobileWidth; width: @mobileWidth;
margin: @mobileMargin; margin: @mobileMargin;
@ -188,7 +188,7 @@
/* Position Adjustments */ /* Position Adjustments */
@media only screen and (max-width : (@tabletBreakpoint - 1px)) {
@media only screen and (max-width : @largestMobileScreen) {
/*rtl:ignore*/ /*rtl:ignore*/
.ui.modal .content > .image { .ui.modal .content > .image {
display: block; display: block;
@ -305,7 +305,7 @@
color: @innerCloseColor; color: @innerCloseColor;
} }
@media only screen and (max-width : (@tabletBreakpoint - 1px)) {
@media only screen and (max-width : @largestMobileScreen) {
.ui.fullscreen.modal { .ui.fullscreen.modal {
width: auto !important; width: auto !important;
margin: @fullScreenMobileMargin !important; margin: @fullScreenMobileMargin !important;
@ -328,7 +328,7 @@
} }
/* Small Modal Width */ /* Small Modal Width */
@media only screen and (max-width : (@tabletBreakpoint - 1px)) {
@media only screen and (max-width : @largestMobileScreen) {
.ui.small.modal { .ui.small.modal {
width: @smallMobileWidth; width: @smallMobileWidth;
margin: @smallMobileMargin; margin: @smallMobileMargin;
@ -363,7 +363,7 @@
.ui.large.modal > .header { .ui.large.modal > .header {
font-size: @largeHeaderSize; font-size: @largeHeaderSize;
} }
@media only screen and (max-width : (@tabletBreakpoint - 1px)) {
@media only screen and (max-width : @largestMobileScreen) {
.ui.large.modal { .ui.large.modal {
width: @largeMobileWidth; width: @largeMobileWidth;
margin: @largeMobileMargin; margin: @largeMobileMargin;

6
src/definitions/views/card.less

@ -511,7 +511,7 @@ a.ui.card:hover,
--------------------*/ --------------------*/
/* Mobily Only */ /* Mobily Only */
@media only screen and (max-width : (@tabletBreakpoint - 1px)) {
@media only screen and (max-width : @largestMobileScreen) {
.ui.two.doubling.cards { .ui.two.doubling.cards {
margin-left: @oneCardOffset; margin-left: @oneCardOffset;
margin-right: @oneCardOffset; margin-right: @oneCardOffset;
@ -596,7 +596,7 @@ a.ui.card:hover,
} }
/* Tablet Only */ /* Tablet Only */
@media only screen and (min-width : @tabletBreakpoint) and (max-width : (@computerBreakpoint - 1px)) {
@media only screen and (min-width : @tabletBreakpoint) and (max-width : @largestTabletScreen) {
.ui.two.doubling.cards { .ui.two.doubling.cards {
margin-left: @oneCardOffset; margin-left: @oneCardOffset;
margin-right: @oneCardOffset; margin-right: @oneCardOffset;
@ -684,7 +684,7 @@ a.ui.card:hover,
Stackable Stackable
--------------------*/ --------------------*/
@media only screen and (max-width : @tabletBreakpoint) {
@media only screen and (max-width : @largestMobileScreen) {
.ui.stackable.cards { .ui.stackable.cards {
display: block !important; display: block !important;
} }

3
src/themes/packages/default/globals/site.variables

@ -104,6 +104,9 @@
@largeMonitorBreakpoint : 1400px; @largeMonitorBreakpoint : 1400px;
@widescreenMonitorBreakpoint : 1900px; @widescreenMonitorBreakpoint : 1900px;
@largestMobileScreen : (@tabletBreakpoint - 1px);
@largestTabletScreen : (@computerBreakpoint - 1px);
/******************************* /*******************************
Power-User Power-User

Loading…
Cancel
Save