Skip to content

Prefixfree breaks sites that use <base> tag and css imports #134

ubershmekel opened this Issue Dec 17, 2012 · 1 comment

2 participants


Related issues: Issue #4 Issue #14 Issue #129

Here's an example site that prefixfree breaks:

If you remove prefixfree the box-shadow works. Otherwise, prefixfree cancels the stylesheet and tries to get b/aa.css instead of a/aa.css, a link that should be relative to the css file, not relative to the rebased html page.

Steps to reproduce:

From HTML:

<base href="b/"></base>
<link href='../a/a.css' rel='stylesheet' type='text/css'>
<script src="../prefixfree.min.js"></script>

From a.css:
@import "aa.css";

From aa.css:
h1 { box-shadow: .1em .2em .4em -.2em black; }

@ubershmekel ubershmekel referenced this issue in Countly/countly-server Dec 17, 2012

Subsite countly #40


I have the same issue and confirmed that removing the @import fixes it.

Additional info:

  • The issue did not affect FireFox (18.0) but did affect Chrome (24.0.1312.70) - Both on Fedora and Mac OS X.
  • The issue is intermittent and probably timing related:
    • A full refresh (shift click on refresh) will trigger the problem rarely (1 in 10)
    • A regular refresh using browser cache will trigger the problem most times (9 in 10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.