Jump to content

combining external CSS File


Dr.Nikos

Recommended Posts

Hi

 

When combining the External CSS Files to the main css file,  in an attempt to increase site speed,

 

  1) should we copy-paste all the external css files to the main css file?

  2) is there a specific order in which this the External CSS Files must be copied to the main css file?

  3) should the @import url("style.css" rule on those file when pasting be deleted?

  4) where do i find the original css file

 

Thank you

Link to comment
Share on other sites

It would help speed it up. I would combine them in the order of the top down script. Because of the way that style sheets cascade it is important to keep the same order or you might break some of the layout functionality. 

Link to comment
Share on other sites

Thank you for the reply.   Just to make sure:

 

1) should we simply copy-paste all the external css files to the main css file in order?

  2) should the @import url("style.css" rule on those file when pasting be deleted?

  3) where do i find the original css file?

  4) its best  not to change the original or external css, but merely name thm differently in odrer to fall back to them if something goes wrong?

   5 )  minimizing after the combinations are complete?

 

Thank you for your assistance

Link to comment
Share on other sites

1, yes, that is what I do.

 

2, I would remove the @import and just combine the files. 

 

3, You can locate the location viewing the source of your website

 

4, its either or. We recommend not doing regular updates to things so we hard code them in the original files a lot.

 

5, I would let prestashop handle the minification.

Link to comment
Share on other sites

Thank you @Dh42

 

Almost forgot. Also delete the link in the html to those external files    :) 

 

I am very new at this. In the ftp client,there is a file called global.css under the folder css. Is this the main css file?

Plus the html file where in the ftp is it?

 

Please be considered. I am a newbie at this

Link to comment
Share on other sites

The css file can be all scattered around to be honest. There are several different ways developers add them to modules and themes. This is going to be tough for you to accomplish without messing something up I feel. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...