trichview.support
Re: Unnecessary css lines in the source of a HTML-file |
Author |
Message |
Sergey Tkachenko |
Posted: 11/14/2004 21:37:18 Yes, all existing styles are saved in CSS. You can remove unnecessary styles by calling DeleteUnusedStyles. RichViewActions automatically call this method for the loaded documents. But it does not remove styles that have Standard property = True, i.e. initial styles. Moreover, the 0-th style is very important when saving CSS, because for other styles only a difference from it is saved. So the proper choosing of properties of the 0-th text style can greatly reduce CSS size. For RichViewActions, it can be done in TrvActionNew.OnNew event. The important drawback of DeleteUnusedStyles - it may delete styles that used by deleted content (stored in undo buffer). So, it you call it for editor, call it with ClearUndo. Yes, things may be improved here. It's in my to-do list: - to make undoable version of DeleteUnusedStyles - to avoid saving unused styles in CSS. |
Powered by ABC Amber Outlook Express Converter