tobiasstrebitzer / FireFile

Firefox CSS Live Editing Plugin
www.firefile.at
53 stars 12 forks source link

Maintain CSS Layout and Comments #12

Open jp2m5 opened 13 years ago

jp2m5 commented 13 years ago

This is a fantastic application in function, but as CSS designers, we are very particular in the way we lay out our documents and comment certain sections of our documents.

For instance, if I have a navigation div, I often like to place my navigation "ul" and "li" elements tabbed in below their respective divs. Is this needed? No, but it's how I code. It's easy on my eyes.

In addition, when I start a section of my CSS, like a sidebar, I comment "Start Sidebar" and at the end with "End Sidebar".

If this program allowed for maintaining the original structure of my CSS, in addition to keeping comments exactly where they were, I would even PAY for this utility.

in any event, congratulations in making something really awesome. I hope to see these features!

If this is confusing in any way, I would be more than happy to address any questions.

PremiumWebServices commented 13 years ago

I agree. I would also like to keep my structure intact. In many cases I can't use this tool due to the fact that it removes things from the css file (which need to be in there). I would be happy if it just added any new declarations at the end of the css file. It could even create a new section at the bottom which would state // These statements were created by FireFile // and all the code will be below that line.

jp2m5 commented 13 years ago

Hey that's a really good idea. Tacking declarations at the bottom. Very interesting. I could see this being the solution...

tobiasstrebitzer commented 12 years ago

Hi guys sry for the inactivity over the last month.

v0.9.0 (+server update to v0.9.0) now handles the css- file's structure way better.

Still, the source is interpreted by firefox, then brought back to the css file, which mean's the source potentially changes, but comments are now better preserved and all rule types (even advanced css3 features) are being preserved.

Please give it another try, i'll leave the issue open, and report back if the output is acceptable.

One word aside: the messing with the source can actually be a good thing - at least for me - as i'm not concerned anymore with cleaning the source. Now that comments are handled better, and all rules are supported, i use it to clean up stylesheets that i get hands on (like a new wordpress theme, etc...). Make sure you turn compression off, so the file remains readable

axil commented 12 years ago

Hi, thanks for your great addon! 1) I've noticed the following issue: in version v0.9.0 comments don't get updated when changed on server (ff9, firebug 1.9.0, win7sp1). Can this be fixed somehow? 2) Do you have plans for supporting comments inside the css rules - not only between them?

tobiasstrebitzer commented 12 years ago

1) can you describe the process and how to reproduce? did you update the files with firefile, or did you edit the stylesheet in another way? 2) It was already implemented earlier, but i ran into performance issues on that (the processing of the comments needs to be done by firefile, as firebug does not). If i get more requests on that, i'll try again with a different approach.

axil commented 12 years ago

1) I changed a rule and a comment in the css file on server manually (via ssh) , then reloaded the page in FF. Firebug understood the change (cache got updated) since I could see new values for the rule, but Firefile cache still kept the original version of the comment, and reverted my changes in comment when I pushed "upload" afterwards. Commenting the corresponding lines in Firefile responsible for caching the comments helps, but then the cursor never blinks when I edit css rules in Firebug.

2) I moved some meaningful comments into the space between rules as a workaround.

Still there're a couple of lines commented out in the css files. Doing so with them doesn't look reasonable. In fact, I don't need them that much when working with firebug. If it is difficult to show them it would be convenient if they were at least kept as is when uploading to server.

Plus I ran into one or two actual uses of comments inside the rules in my css files. For example one of our designers generated the following code:

margin-left: 10px /* fix for IE6 */

I don't approve such a way of working around the IE issues, so I happily sacrificed such comments altogether.

The bottomline: as for me - I don't need comments inside the rule if there're any problems with implementing it.