Skip to content

Instantly share code, notes, and snippets.

@lbvf50mobile
Created August 4, 2017 11:28
Show Gist options
  • Select an option

  • Save lbvf50mobile/2ee13e5f250628b545a29b95f55520af to your computer and use it in GitHub Desktop.

Select an option

Save lbvf50mobile/2ee13e5f250628b545a29b95f55520af to your computer and use it in GitHub Desktop.
$screen_width_px: 320; /* this is widht of iPhone5 */
@media all and (min-width: 414px) {
$screen_width_px: 414; /* this is widht of iPhone6 Plus */
}
$sketch_width_pt: 187; /* This is width in zeplin.io */
@function pt2px($num_pt){
@return ceil(($screen_width_px/$sketch_width_pt)*$num_pt + 0px);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment