@import css - not working
Permalink
Hi,
I'm trying to clean my main CSS file by make some extra files for menu's and stuff. But when I try to use the @import in my main css is does not load the others files. I suspect that path is not correct cause Concrete5 seems to load the file from a patch with /cache in it.
I'm trying to clean my main CSS file by make some extra files for menu's and stuff. But when I try to use the @import in my main css is does not load the others files. I suspect that path is not correct cause Concrete5 seems to load the file from a patch with /cache in it.
Using @import is not a good way to go. Cannot you combine into one file?
Just section the parts you need
Just section the parts you need
I want to make different files because I want keep it clean. Especially with scaled css codes for mobile and tablets.
The best way for me is putting all the css files in the header.
The best way for me is putting all the css files in the header.
Sorry, @import is NOT good!
Take what you need from the other files and combine. This will make everything 'cleaner' for compliance (fewer CSS calls), W3c and a lot better for all devices.
If you need help, let me know.
Take what you need from the other files and combine. This will make everything 'cleaner' for compliance (fewer CSS calls), W3c and a lot better for all devices.
If you need help, let me know.
Why is @import not the way to go?
Many more files involved in the page = much slower pages
they prevent parallel downloading
http://www.drupalden.co.uk/render-blocking-and-parallel-downloading...
http://www.drupalden.co.uk/render-blocking-and-parallel-downloading...
With your path issue,(op), I cannot help as I cannot see the url of the website.
Try using google/yslow page speed orhttp://www.webpagetest.org/ with any website that uses '@import' and you'll see what we mean.
Try using google/yslow page speed orhttp://www.webpagetest.org/ with any website that uses '@import' and you'll see what we mean.
Best way round it is to structure your css as a set of less files and compile the less (either offline or online) into a single css file.
That way you get the advantages of organisation with the advantage of a single css file, but the disadvantage of having to compile it. You also get to use less which is much easier to work with than straight css.