Skip to content

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

Open
ubershmekel opened this Issue Dec 17, 2012 · 1 comment

2 participants

@ubershmekel

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

Here's an example site that prefixfree breaks: https://dl.dropbox.com/u/52201148/import%20base%20test/i.html

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
Closed

Subsite countly #40

@chrismichaelscott

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.