It seems @font-face is a bug and prevents other stylesheets from being
minified.
See example here: view-source:
http://www.bonarhouseclinic.co.uk/dev/
The CSS in the file fonts.css is...
body {
margin:0;
padding:0;
}
/*
Author : Mark McDonnell
Document : Fonts
Created on : 22-09-2010
Description : Sets the custom fonts.
Note : The URLs need to be absolute paths (so double check when
pushing to production server)
*/
body {
background-color:red;
}
@font-face {
font-family: 'AllerItalic';
/*
src: url('/Assets/Fonts/aller_it-webfont.eot');
src: local('☺'), url('/Assets/Fonts/aller_it-webfont.woff')
format('woff'), url('/Assets/Fonts/aller_it-webfont.ttf')
format('truetype'), url('/Assets/Fonts/aller_it-
webfont.svg#webfontfpGpm2yp') format('svg');
font-weight: normal;
font-style: normal;
*/
}
...but if I remove the @font-face rule then the file will be
successfully minified via the pagespeed module.
Can someone please advise on this.
Kind regards,
Mark
On Dec 8, 11:35 am, Integralist <
storm.m...@gmail.com> wrote:
> So the @font-face declaration (as far as you are concerned) should be
> possible to minify without any issues?
>
> If so I'll put together some tests for this.
>
> Thanks!
>
> M.
>
> On Dec 1, 4:35 am, Shawn Ligocki <
sligo...@google.com> wrote:
>
>
>
>
>
>
>
> > On Fri, Nov 26, 2010 at 8:22 AM, Integralist <
storm.m...@gmail.com> wrote:
> > > Hi,
>
> > > I have two questions, the first is a major issue and the second is
> > > very simple and I'm asking because I'm completely new to Linux...
>
> > > 1.) How can I get the Pagespeed module to ignore certainCSSfiles?
> > > E.g. on most of our websites we have a fonts.cssfile which includes
> > > custom fonts using @font-face and at the moment the Pagespeed module
> > > refuses to minify ANY of our other style sheets when it encounters
> > > this fonts.cssfile because technically it's not validCSS(e.g.
> > > running through the standard W3C validator this font.cssfile fails
> > > because @font-face is only currently available in CSS3 working draft).
>
> > > I want to tell the server (either via .htaccess - or by modifying our
> > > httpd config file on the server) to ignore any files called fonts.css
> > > so at least my other stylesheets can be concatenated and minified.
>
> > > By the way, we will minify anyCSSfiles that we can parse and combine any
>
> > that don't have a few constraints (aren't different media types, non-first
> >CSSdon't have @import, etc.)
>
> > So the reason that otherCSSfiles aren't being minified or combined should
> > not be related to the fact that font.csscannot be parsed. You could try
> > making dummy pages with variousCSSfiles linked to see this.