![]() |
#16 | |
Hedge Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Quote:
Occasionally an ePub has rules not covered by my CSS. In this case I keep the original rules. Usually these relate to lists or tables. |
|
![]() |
![]() |
![]() |
#17 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#18 | |
Hedge Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Quote:
I just checked the number of selectors in my CSS and there are twentyfive. Usually the minimum number of these selectors in a book is three. The maximum is usually 20ish. Added to this may be rules from the original stylesheet for tables, lists and image sizes. |
|
![]() |
![]() |
![]() |
#19 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#20 | |
Hedge Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Quote:
![]() The only important appointment I have is with a thin, black clad gentleman of an agricultural persuasion, who will meet up with me when they are ready. ![]() |
|
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Book E d i t o r
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
|
If I don't need to reformat the entire file, I will manually fix certain CSS classes. One example is when the first paragraph is not indented, I will quickly fix it by adding -ni to the end of the current class name using find and replace, and then highlight and copy the original class in the CSS file (to the clipboard), paste it into the CSS file, and add the -ni to the end of the pasted class name, and then change the text-indent to zero.
When the class codes are so messed up in the file, I might decide to reformat all of it. I will copy my entire template CSS file over the .calibre class in the CSS file. Then I'll find and replace all the current classes and change them to my simple class names (like: text, ni, chapter, desc, copy, heading, ded, acks, reviews, epi, contents, etc...class names that describe the text I'm changing and class names that are easy to remember--most publishers don't use these simple class names). When reformatting, I'll only use <span class> for italics (I have a macro for those by hitting F10), for smaller inline text (like capital letters on a sign in the story), and for text with no-italics (for book titles within italicized paragraphs). While reformatting, I'll periodically hit the Beautify Files button to automatically remove all the </span> codes and to format all the text to remove spaces, etc. When all done reformatting, I'll use the Reports function to find any remaining original classes, fix those, and then I'll hit the Remove Unused CSS, the Beautify Files, the Smarten Punctuation, and the Check Book buttons.. |
![]() |
![]() |
![]() |
#22 | |
Hedge Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Quote:
It worked flawlessly and helped a lot as by chance the book could have been designed to test this feature. It created one stacked rule from eight identical rules and another stack from six. This was within the same CSS!. It was smallish only about 800 lines. Thank you for adding this feature. I really appreciate the work and thought you put into Calibre. And the way you put up with not so good ideas and suggestions some of which have come from me. ![]() |
|
![]() |
![]() |
![]() |
#23 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You're most welcome
![]() |
![]() |
![]() |
![]() |
#24 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
If you merge identical rules and then remove one of those classes from CSS and then go to remove unused classes from CSS, will that unused class be removed? If not, can that be fixed?
|
![]() |
![]() |
![]() |
#25 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Jon, why not test this yourself and then ask to have it fixed if it is broken. Makes a lot more sense than asking someone else to test and find out whether or not it is broken.
|
![]() |
![]() |
![]() |
#26 |
Hedge Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
remove unused CSS rules | rjwse@aol.com | Editor | 13 | 09-18-2019 09:39 AM |
CSS Rules | deback | Conversion | 1 | 01-31-2019 03:59 PM |
CSS rules | Sebastian Kane | Calibre | 1 | 07-19-2017 07:25 AM |
Remove unused CSS Rules | Divingduck | Editor | 2 | 06-21-2014 07:51 AM |
Conditional CSS rules | Jellby | ePub | 10 | 01-20-2009 08:32 AM |