Skip to content

Instantly share code, notes, and snippets.

View salmenbej's full-sized avatar

Salmen Bejaoui salmenbej

View GitHub Profile
@salmenbej
salmenbej / ssm-checkMode.js
Last active August 29, 2015 14:08
Check the Portrait / Landscape mode on mobile device with ssm.js ( http://www.simplestatemanager.com/ )
ssm.addConfigOption({name:"orientation", test: function(){
//landscape mode
if(this.state.orientation === "landscape" && window.innerWidth >= window.innerHeight){
console.log('landscape');
return true;
}
//portrait mode
else if (this.state.orientation === "portrait" && window.innerWidth <= window.innerHeight){
console.log('portrait');
return true;
@salmenbej
salmenbej / input.scss
Last active August 29, 2015 14:07
Sass responsive grid system using recursive mixin.
$grid-columns: 12;
$grid-gutter-width : 30px;
$container-xs : ((480px + $grid-gutter-width));
$container-sm : ((720px + $grid-gutter-width));
$container-md : ((940px + $grid-gutter-width));
$container-lg : ((1140px + $grid-gutter-width));
@mixin container-fixed($gutter: $grid-gutter-width) {
margin-left: auto;
@salmenbej
salmenbej / SassMeister-input.scss
Last active August 29, 2015 14:07
Responsive Grid generated with Sass
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
$grid-max-width : 1240px !default;
$col-width : 75px !default;
$col-count : 12 !default;
$col-gutter : 30px !default;
$grid-padding : $col-gutter / 2 !default;