funnelweblog / FunnelWeb

FunnelWeb is an open source blog engine targeted at developers
http://funnelweblog.com/
Other
96 stars 55 forks source link

Bundling breaks relative references in stylesheets #28

Closed georged closed 11 years ago

georged commented 11 years ago

Some of the stylesheets include relative references to the static files, e.g. in \Content\themes\base\Base.css

a.new-window
{
    background: transparent url('../../Images/external.png') no-repeat scroll right center;
    padding: 0 13px 0 0;
}

Before bundling, Base.css was included as "~/Content/themes/base/Base.css" and image path was therefore "~/Content/Images/external.png". Bundling shortens URL

bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/themes/base/Base.css"));

That makes image path to be "~/Content/../../Images/external.png" which is obviously wrong. The easiest solution is probably to artificially extend the bundled path to match previous folder structure, e.g.

bundles.Add(new StyleBundle("~/Content/themes/base/css").Include("~/Content/themes/base/Base.css"));
georged commented 11 years ago

I'm fixing it