Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overflow of .colums over .container with fixed grid in small screen size #31

Closed
dirkolbrich opened this issue Apr 28, 2017 · 2 comments
Closed

Comments

@dirkolbrich
Copy link
Contributor

when set to fixed grid and on small screen size ~320px width, .columnwill overflow .container due to standard padding at .containerin _grid.scss:8

/* BASE GRID
 * ------------------------------------------------ */
.container {
	position: relative;
	width: $base-width;
	max-width: $grid-max-width;
	margin: 0 auto;
	padding: 0 relative(20px);
	box-sizing: border-box;
}

Proposed Fix

add max-widthto columns and delete small subtraction from widthof .colums in _mobileGrid(){}

@mixin _mobileGrid($width, $colCount, $isFluid) {
	$width: if($isFluid, $mobile-fluid-width, $width);
	.container {
		width: $width;
		.column,
		.columns {
			max-width: 100%; // add max-width
			margin: {
				left: if($isFluid, 2%, 0);
				right: if($isFluid, 2%, 0);
			};
		}
		@for $i from 1 through $colCount {
			@if ($i == 1) {
				.#{numToString($i)}.column { width: $width ; }
			}
		}
		@include _group($colCount, ".columns", "after") { width: $width; } // delete -4
		.one-third.column { width: $width; }  // delete -4
		.two-thirds.column { width: $width; }  // delete -4
		.full-width.columns {
			width: $width;
			margin-left: 0;
			margin-right: 0;
		}
		@include _mobileOffset($colCount);
	}
}
@atomicpages
Copy link
Owner

@dirkolbrich same as issue #29, it will help me identify issues/see you fixes much faster!

@atomicpages
Copy link
Owner

I agree with this fix. Works wonderfully!

atomicpages pushed a commit that referenced this issue May 7, 2017
* Addressing issue #31
    * Adding styles for `.one-half`
    * Adding new selectors to fixed grid:
        * `.one-third.columns`
        * `.two-third.columns`
        * `.one-half.column`
        * `.one-half.columns`
        * `.full-width.column`
* Addressing issue #28
* Fixing configuration issues when `$base-gutter-width` is something other than `20px` in fixed grid mixin
* Enforcing `body` margin styles to fixed overflow issue in `960px - 1129px`
    * Applies only to `fresh` theme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants