Welcome Guest, Not a member yet? Register   Sign In
Okay Method for Dealing with Lots of CSS?
#1

[eluser]jamgood96[/eluser]
Is adding and removing CSS links in the <head> using jQuery an okay thing to do? My reason for asking is that my site is mostly dynamic, with many different popup windows and changes in layout, which means there is a far amount of CSS.

One example is that I have a CSS popup that opens for a user to add new data. This isn't going to be used often, so I'd like to add the CSS file to the head and then remove it once the popup is closed.

Thoughts?
#2

[eluser]Aken[/eluser]
That's inefficient. You should reduce your number of CSS files to as few as possible (one is the best). That way the browser only needs to make one request for it on each page load, and after the first page load it's cached to a certain extent for even faster loads after that.

There are handy tools out there to help you concatenate and minify CSS files. Google around!
#3

[eluser]jamgood96[/eluser]
So I'm assuming something like Carabiner is what I want?

Very, very stupid question, but for adding the files, do library files go in system/library or application/library?
#4

[eluser]jjDeveloper[/eluser]
Custom classes to application but check the user guide because if you extend them you will have to use the custom class prefix.
#5

[eluser]Aken[/eluser]
Your application's code should always go in the application folder. The system folder should be reserved for the default core files, which is what will be changed when you upgrade CI versions in the future.

As for CSS tools that might help, Carabiner might be useful - it's hard to say based on the limited amount of info from the thread for it. Also not sure if it will combine files. I was thinking more along the lines of computer programs to aid in development. Do you use a Mac or PC? Macs have a ton of useful things these days.
#6

[eluser]jamgood96[/eluser]
[quote author="Aken" date="1327539306"]Your application's code should always go in the application folder. The system folder should be reserved for the default core files, which is what will be changed when you upgrade CI versions in the future.

As for CSS tools that might help, Carabiner might be useful - it's hard to say based on the limited amount of info from the thread for it. Also not sure if it will combine files. I was thinking more along the lines of computer programs to aid in development. Do you use a Mac or PC? Macs have a ton of useful things these days.[/quote]

So I played with Carabiner earlier today and it helps by combining several files into one. But I'm still at dilema as far as the code. Do I create several CSS and JS files in order to keep myself sane, then combine then all at once upon loading, or is there another technique used for keeping them all in one.

I was previously using DreamWeaver (on a monthly subscription) but just switched to Coda last week. What other programs might you suggest?
#7

[eluser]Aken[/eluser]
CodeKit is my new favorite toy. It helps you incorporate the LESS CSS language.




Theme © iAndrew 2016 - Forum software by © MyBB