Created
July 8, 2014 09:41
-
-
Save teodragovic/9ec2594cd22a1ff2f3a2 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.9) | |
// Compass (v1.0.0.alpha.20) | |
// ---- | |
// bourbon funkcija | |
@function em($pxval, $base: $em-base) { | |
@if not unitless($pxval) { | |
$pxval: strip-units($pxval); | |
} | |
@if not unitless($base) { | |
$base: strip-units($base); | |
} | |
@return ($pxval / $base) * 1em; | |
} | |
// neka naša ekstra funkcija | |
@function mq-em($pxval) { | |
@return em($pxval, 16); | |
} | |
// base font | |
$em-base: 12; | |
// breakpoint varijabla | |
$bp-beta-s: 600; | |
// fallback za ie | |
$fix-mq: false !default; | |
// breakpint mixin | |
@mixin bp($point) { | |
@if $fix-mq { | |
@if $fix-mq >= $point { | |
@content; | |
} | |
} | |
@else { | |
@media screen and (min-width: em($point, 16)) { | |
@content; | |
} | |
} | |
} | |
// primjer | |
.Contact-title { | |
margin-bottom: 20px; | |
@include bp($bp-beta-s) { | |
margin-left: percentage(1/16); | |
} | |
} | |
// primjer bez mixina | |
.Contact-subtitle { | |
padding: 10px; | |
@media screen and (min-width:mq-em($bp-beta-s)) { | |
padding: 15px; | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.Contact-title { | |
margin-bottom: 20px; | |
} | |
@media screen and (min-width: 37.5em) { | |
.Contact-title { | |
margin-left: 6.25%; | |
} | |
} | |
.Contact-subtitle { | |
padding: 10px; | |
} | |
@media screen and (min-width: 37.5em) { | |
.Contact-subtitle { | |
padding: 15px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment