// Archer:Function
// 
// @file    function.styl
// @author  firede(firede@firede.us)

@import 'config'

/**
 * pixel to rem
 */
px_to_rem(_pixel)
    unit(_pixel / $font_size_pixel, rem)

/**
 * hidpi
 *
 * @see http://goo.gl/eHTUo6
 * @see http://bjango.com/articles/min-device-pixel-ratio/
 */
hidpi(_dppx = $retina_dppx)
    _min_resolution = round(unit(_dppx * 96, dpi))
    return "only screen and (-webkit-min-device-pixel-ratio: " + _dppx + "), only screen and (min-resolution: " + _min_resolution + ")"
