Sha256: e2add53f596af93da7f6d29459d15329bf37409b3b4e8b48e6ca5b4a3d54a6ed

Contents?: true

Size: 1.69 KB

Versions: 44

Compression:

Stored size: 1.69 KB

Contents

// supporting mixin for @mixin the_grid
// 'grid_placement' sets display, float and margin for the block
@mixin grid_placement($grid_align, $grid_uom, $grid_child, $grid_context_width, $margin) {
	
	@include box_sizing;
	
	@if $grid_align == center {
		margin: 0 auto;
	}
	@else if $grid_align == left {
		margin: 0;
	}
	
	@else {
		@if $grid_child == alpha {
			@if $grid_uom == em {
				$margin_calc: #{$margin / $em}em;
				@include grid_margin($grid_child, $margin_calc);
			}
			@else if $grid_uom == combo {
				$margin_calc: #{$margin / $em}em;
				@include grid_margin($grid_child, $margin_calc);
			}
			@else if $grid_uom == percent {
				$margin_calc: $margin / $grid_context_width * 100%;
				@include grid_margin($grid_child, $margin_calc);
			}
		}
		
		@else if $grid_child == omega {
			@if $grid_uom == em {
				$margin_calc: #{$margin / $em}em;
				@include grid_margin($grid_child, $margin_calc);
			}
			@else if $grid_uom == combo {
				$margin_calc: #{$margin / $em}em;
				@include grid_margin($grid_child, $margin_calc);
			}
			@else if $grid_uom == percent {
				$margin_calc: $margin / $grid_context_width * 100%;
				@include grid_margin($grid_child, $margin_calc);
			}
		}
		
		@else if $grid_child == none {
			@if $grid_uom == em {
				$margin_calc: #{$margin / $em}em;
				@include grid_margin($grid_child, $margin_calc);
			}
			@else if $grid_uom == combo {
				$margin_calc: #{$margin / $em}em;
				@include grid_margin($grid_child, $margin_calc);
			}
			@else if $grid_uom == percent {
				$margin_calc: $margin / $grid_context_width * 100%;
				@include grid_margin($grid_child, $margin_calc);
			}
		}
		
		@else if $grid_child == alphaomega {
			margin-left: 0;
			margin-right: 0;
		}

	}	
}

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
stipe-0.0.4.3 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.4.2 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.4.1 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.4.0 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.3.9 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.3.8 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.3.7 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.3.6 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.3.5 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.3.4 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.3.3 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.3.2 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.3.1 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.3 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.2.9 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.2.8 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.2.7 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.2.6 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.2.5 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.2.4 stylesheets/stipe/grid/lib/_grid_placement.scss