afelix/csso — Issue #50: @font-face removes multiple src attributes
Author: ccampbell
Created: 2012-01-24 00:03:32+00:00
State: open

Sometimes it is necessary to include multiple src attributes for a font (for a fallback for IE).

It would look something like this:

@font-face {
font-family: 'pictos';
src: url('../fonts/pictos-web.eot'); /* IE9 Compat Modes */
src: local('☺'), url(data:application/x-font-woff;charset=utf-8;base64,longbase64encodedstring) format('woff'), url(data:font/truetype;charset=utf-8;base64,otherlongbase64encodedstring) format('truetype'), url('pictos-web.svg#webfontIyfZbseF') format('svg');
font-weight: normal;
font-style: normal;
}

When compressed the first src: url should not be removed, but it is:

@font-face{font-family:'pictos';src:local('☺'),url(data:application/x-font-woff;charset=utf-8;base64,longbase64encodedstring) format('woff'),url(data:font/truetype;charset=utf-8;base64,otherlongbase64encodedstring) format('truetype'),url('pictos-web.svg#webfontIyfZbseF') format('svg');font-weight:400;font-style:normal}

Moving this into an IE specific stylesheet is a fix for now, but it shouldn't fail when compressed.