Sha256: c66999a9e1d2322f72425a55c6cb3403ab43234822f33cd448d9f1abfc58cf37

Contents?: true

Size: 1.18 KB

Versions: 2

Compression:

Stored size: 1.18 KB

Contents

@mixin visible-on($size, $display: inherit) {
	@if $size == large {
		&.hide-for-large { display: $display !important; }
	} @else if $size == small {
		&.hide-for-small { display: $display !important; }
	}
}

// Elements that need special `display`
@mixin special-display($size) {
	table {
		@include visible-on($size, table);
	}
	thead {
		@include visible-on($size, table-header-group);
	}
	tbody {
		@include visible-on($size, table-row-group);
	}
	tr {
		@include visible-on($size, table-row);
	}
	td, th {
		@include visible-on($size, table-cell);
	}
	span, b, em, strong, .bold, .italic, code {
		@include visible-on($size, inline-block);
	}
}

@if $include-visibility {
	
/* ---------------
EDGE Visibility
--------------- */

/* Above small breakpoint (>#{$small-screen}) */
.hide-for-large { display: none !important; }
@include above(small) {
	.hide-for-small { display: inherit !important; }
	@include special-display(small);
}


/* Below small breakpoint (<=#{$small-screen}) */
@include below(small) {
	.hide-for-small { display: none !important; }
	.hide-for-large { display: inherit !important; }
	@include special-display(large);
}

}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
edge_framework-0.9.0 assets/sass/edge/components/_visibility.scss
edge_framework-0.8.1 assets/sass/edge/components/_visibility.scss