vogue icon indicating copy to clipboard operation
vogue copied to clipboard

Imported CSS files were ignored

Open ghost opened this issue 14 years ago • 4 comments
trafficstars

Hi there,

I just tried out vogue and it just does not work. So I looked at the code of the current project I'm working on saw that there is one main CSS file which includes all neccessary css files by @import-statement. But when I change something in one of these imported css files, no change were made by vogue.

If I change the main css file, everything works fine.

Try it out: create a main css file and import another css by placing @import "another.css" into the main css. Then change something in another.css and you will see, no change in the browser.

Martin

ghost avatar May 17 '11 20:05 ghost

Vogue currently only finds stylesheets included using link elements. Whilst it's feasible to scan the stylesheets for imports, I'm unsure how to force the browser to reload stylesheets included that way. I suppose I could append a new link element for updated stylesheet...

I avoid using @import myself (http://www.stevesouders.com/blog/2009/04/09/dont-use-import/) so haven't hit this problem before.

I'm very happy to accept pull requests if someone would like to work on this issue.

andrewdavey avatar May 17 '11 20:05 andrewdavey

I avoid using@import myself too, but in my current project another programmer did this. I just removed the import-statements and linked the stylesheets directly. Now it works correctly.

Maybe I will change this and do a pull request, if I find time for it ;)

ghost avatar May 18 '11 08:05 ghost

OK, I'm glad you were able to work around the problem. I'll leave this issue open in the hope that you, or some other kind soul, is able to submit a patch :)

andrewdavey avatar May 18 '11 16:05 andrewdavey

@import statements are sadly needed if you want to avoid IEs stylesheet limit. I hit that one all the time when I am doing css at work since we are using very modular code and stylesheets come from all over the place.

Munter avatar Dec 29 '11 09:12 Munter