I use the function inline-imageto create icon classes. This is my current SCSS:
.folder {
background: inline-image("icons/home/folder.png", 'image/png') no-repeat center;
height: 30px;
width: 41px;
}
I am looking for a function that can determine the width and height of an image, so I can do something like this:
.folder {
background: inline-image("icons/home/folder.png", 'image/png') no-repeat center;
height: image-height("icons/home/folder.png", 'image/png');
width: image-width("icons/home/folder.png", 'image/png');
}
Is there anything similar?
source
share