Page 1 of 1

CSS rules disappear, then reappear

PostPosted: Fri Nov 11, 2011 2:10 pm
by skreynol
When editting a page using external css rules, I have observed several occasions when the rules displayed in Kompozer disappear. The following scenario is one instance. In the editor, via CSS icon, added rules to existing rule set, viewed page in 'Normal' view to confirm rules were working, then went into 'Source' view and did some editting - in this case, I deleted some in-line styles Kompozer had inserted. When I went back to 'Normal' view, the rules I had added to the rule set were no longer workikng, and when I went into the css table, the rules were gone - although the rules that had existed when I opened the page were stilll showing. I then went back to 'Normal' view, did a 'File' 'Save' and 'Exit', and then went back into Kompozer. The rules I had added and then saw 'gone' were back, visible in the css table, and working on the screen. I have seen this a number of times, and have not really come up with a reliable way to get the rules to 'stick'. I make copies of my css tables and save often. I am running version 0.7.10.

Re: CSS rules disappear, then reappear

PostPosted: Fri Nov 11, 2011 3:11 pm
by gregtutor
There isn't a 100% reliable way to get the rules to stick.

General rules of thumb to reduce it to an absolute minimum are:

# Use an external editor *NOT* SOURCE view, which is always prone to screw up code and re-write what you've just written in ways that it thinks fit.

# Avoid entering code under the GENERAL tab of the CSS Stylesheets dialogue. Use the fields under the other tabs instead.

If you find the CSS Stylesheets dialogue awkward to use and are generally competent coder then it's worth setting up the "Site Manager" - not for the publishing function which is broken -but simply to provide a panel where you can double click a file to load it into the main window. You can happily load and edit an external CSS file this way, seeing the whole thing at once instead of small snippets in the dialogue. It's much easier to re-order the rules this way too!

Re: CSS rules disappear, then reappear

PostPosted: Fri Nov 11, 2011 4:40 pm
by wink0r
Sometimes the 'revert' function under the file tab will bring back 'lost' css rules. Revert is also available from the context menu if you right click on a tab.