Skip to content

Instantly share code, notes, and snippets.

View galpratama's full-sized avatar
🎯
Focusing

Galih Pratama galpratama

🎯
Focusing
View GitHub Profile
@galpratama
galpratama / pxtoem-function.scss
Created November 23, 2015 15:45 — forked from ariona/pxtoem-function.scss
Pixel to Em function for SASS
$browser-context: 16;
@function em($pixels, $context: $browser-context) {
@if (unitless($pixels)) {
$pixels: $pixels * 1px;
}
@if (unitless($context)) {
$context: $context * 1px;
}
@galpratama
galpratama / sass-responsive-mixin.scss
Created February 25, 2016 11:09 — forked from peschee/sass-responsive-mixin.scss
SASS responsive mixin (bootstrap breakpoints)
/**
* Responsive mixin. The media breakpoints are as defined
* in the twitter bootstrap framework:
*
* - phone
* - tablet-portrait
* - tablet-landscape-desktop
* - large-desktop
*
* Additional parameters for tagetting retina and non-retina