1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
width(img)
return image-size(img)[0]
height(img)
return image-size(img)[1]
body
foo image-size('gif')
foo image-size('gif')[0] == width('gif')
foo image-size('gif')[1] == height('gif')
body
foo image-size('tux.png')
foo image-size('tux.png')
bar image-size('flowers.jpeg')
bar image-size('flowers_p.jpg')
baz image-size('tiger.svg')
body
foo image-size('foo.png', true)
// Checking for the file, so we could do a fallback
body.tux
if image-size('tux.png', true)
background: url('tux.png')
else
background: lime
body.foo
if image-size('foo.png', true)
background: url('foo.png')
else
background: lime
|