View Single Post
Old 06-08-2024, 03:27 PM   #21
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 47,254
Karma: 171291590
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by odamizu View Post
Vellum drives me nuts. If there is an easy way to get rid of the excessive divs with the multitude of classes and what that does to the css stylesheet, I would love

I use Sigil with TagMechanic to manually reduce the number of divs one by one and cssRemoveUnusedSelectors to clean up the css, but it's an arduous, manual process for me.

I'm also perplexed by the media queries. I usually just delete the entire media query stylesheet then manually edit the main stylesheet to my liking. Again, an arduous, manual process.

Advice, recommendations, instruction, tips — all greatly appreciated.
Since Vellum is pretty consistent, I have a collection of saved searches and automations in Sigil to do the clean up.
  1. Replace the media queries stylesheet with a stylesheet with about 5 entries
  2. Run the HTML saved search/replace set
  3. Run the first automation collection
  4. Run the CSS cleanup saved search/replace set
  5. Manually run CSS reformat (multiple lines per style) to clean up the blank lines in the stylesheet
  6. Run the second automation collection
  7. Run the Afters saved search/replace set
  8. Use Tag Mechanic to remove blank <div> and <span>
  9. Run the second automation to check everything is okay

Some oddities are that the HTML search/replace set replaces any &lt; and &gt; in the HTML files with #lt; and #gt; since the CustomCleanerPlus plugin I use with Sigil is not happy with them. The Afters reverses that change. One author loves using "&lt;&lt; text string &gt;&gt;" in their books to indicate non-verbal communication between two characters. << do you believe in telepathy? >>

Last edited by DNSB; 06-08-2024 at 03:29 PM.
DNSB is offline   Reply With Quote