@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.

 
JohntheFish replied on at Permalink Reply
JohntheFish
Your suspicion likely correct.

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.
Steevb replied on at Permalink Reply
Steevb
Using @import is not a good way to go. Cannot you combine into one file?

Just section the parts you need
JaPPa replied on at Permalink Reply
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.
Steevb replied on at Permalink Reply
Steevb
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.
JaPPa replied on at Permalink Reply
Why is @import not the way to go?
JohntheFish replied on at Permalink Reply
JohntheFish
Many more files involved in the page = much slower pages
Phallanx replied on at Permalink Reply
Phallanx
Steevb replied on at Permalink Reply
Steevb
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.