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.5.7.6 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.5.7.5 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.5.7.4 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.5.7.3 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.5.7.2 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.5.7.1 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.5.7 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.5.6 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.5.5 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.5.4 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.5.3 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.5.2 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.5.1 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.5.0 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.4.9 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.4.8 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.4.7 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.4.6 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.4.5 stylesheets/stipe/grid/lib/_grid_placement.scss
stipe-0.0.4.4 stylesheets/stipe/grid/lib/_grid_placement.scss