Open ghost opened 10 years ago
This is a easy fix :+1: @tj
image(path, w = auto, h = auto, min_pixel_ratio = 1.5)
background-image: url(path)
s = 'all and (-webkit-min-device-pixel-ratio:' + min_pixel_ratio + '),'
s = s + '(min--moz-device-pixel-ratio:' + min_pixel_ratio + '),'
s = s + '(-o-min-device-pixel-ratio:' + min_pixel_ratio + '/1),'
s = s + '(min-device-pixel-ratio:' + min_pixel_ratio + '),'
s = s + '(min-resolution:' + unit(min_pixel_ratio*92, dpi) + '),'
s = s + '(min-resolution:' + unit(min_pixel_ratio, dppx) + ')'
@media s
ext = extname(path)
path = dirname(path) + '/' + basename(path, ext) + '@2x' + ext
//p('final: ' + path) // uncomment this line to view url result
background-image: url(path)
if w in (cover contain) and h == auto
h = null
background-size: w h
@oOthkOo - wanna make a PR?
@slang800 How I can do that ? I am a solid beginner on Github ;-)
Image() mixin breaks full image url:s with nib 1.0.2
For example:
Output:
Second slash is missing after http: in the high resolution image url.