Consolidating CSS

After you have worked on a Flare project (or any project that uses CSS) for a while, troche you may find that your CSS stylesheet becomes a little complex. One of the wonderful things about CSS is that when editing the CSS stylesheet in code view (not in the Flare editor) you can re-define the attributes of an element at the bottom of your CSS stylesheet, drugs without having to locate the actual element. The settings further down override the ones that come before. Pretty simple, sale right?

Here’s the problem: the CSS gets funky really fast. I was working on a project today where the writer apparently pasted in the bulk of the CSS twice at the end of the CSS stylesheet. Each section had subtle differences. Thus, H1 was styled with different definitions in three separate locations in the CSS. You couldn’t make changes in the Flare CSS editor, because Flare only edits the FIRST element, so the changes I was saving in Flare weren’t being applied to my topics.

I found a website that solved this problem for me. It’s called Devilo.us, and it is a tool that compresses and cleans up your CSS file. You can point it at a URL, or you can paste in your CSS directly. It will compress multiple instances of the same element into a single CSS statement, using the property valus that were last used in the original CSS document. It will generate a file you can download, or generate it onto the webpage so you can copy and paste it into your CSS.

Of course you will want to back up your CSS stylesheet before you make a major change like this, just in case things don’t go like you expect, but I found this to be a painless solution to the problem of CSS stylesheets that had gotten out of hand.

 

 

, , , ,

No comments yet.

Leave a Reply