01-28-2020, 04:13 PM | #1 |
Addict
Posts: 303
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
|
alphabetizing stylesheet, check book, and remove unused styles
I alphabetize the stylesheet using 'dummy' commands. Here are some examples. I would appreciate comments. Best regards, Pop
|
01-28-2020, 04:33 PM | #2 |
Resident Curmudgeon
Posts: 76,310
Karma: 136006010
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
In English please.
|
Advert | |
|
01-28-2020, 05:04 PM | #3 |
Running with scissors
Posts: 1,557
Karma: 14325282
Join Date: Nov 2019
Device: none
|
Seems like a bad idea if I understand correctly. See also this thread:
https://www.mobileread.com/forums/sh...d.php?t=326852 |
01-29-2020, 01:14 PM | #4 |
Addict
Posts: 303
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
|
clarification of A-Z stylesheet.css in editor
Sorry for not being clear. Here are two screenshots with further explanation. Best regards, Pop
|
01-29-2020, 01:22 PM | #5 | |
Resident Curmudgeon
Posts: 76,310
Karma: 136006010
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
Advert | |
|
01-29-2020, 02:17 PM | #6 | |
Addict
Posts: 303
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
|
"once you remove..."
Quote:
When you ask calibre to remove unused code, I think it leaves alone any line with multiple items, so long as at least one of them is being used: div, ol, p, ul, .class1, .class2 {whatever} So far as I can tell, it will not remove any of the above so long as one of them is in the book. It would be great if it could remove the dead-wood items from a list. Best regards, Pop |
|
01-29-2020, 02:41 PM | #7 | |
Not Quite Dead
Posts: 195
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
|
Quote:
--unstack selectors so Calibre "Remove unused rules" tool can be used: Search: ([.]?[^ ]+),\s([^{]+)(\{[^}]+\}) Replace: \1 \3\n\n\2\3 'Replace All' until 0 returns. |
|
01-29-2020, 02:45 PM | #8 | |
Resident Curmudgeon
Posts: 76,310
Karma: 136006010
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Some publisher CSS is not simple. It can be a bit of a mess. Bit it's not setup to need a specific order most of the time. |
|
01-29-2020, 06:05 PM | #9 | |
Addict
Posts: 303
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
|
"Remove unused rules"
Quote:
|
|
01-29-2020, 06:48 PM | #10 | ||
Not Quite Dead
Posts: 195
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
|
Quote:
Quote:
Last edited by Brett Merkey; 01-29-2020 at 06:52 PM. |
||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
remove unused CSS rules | rjwse@aol.com | Editor | 13 | 09-18-2019 09:39 AM |
Move incode-styles to css-stylesheet with a tool? | patrik | Workshop | 3 | 03-18-2017 02:14 PM |
2.67 - Unused image file not detected by check book | DrChiper | Editor | 3 | 09-08-2016 12:06 PM |
Remove unused class attributes | phossler | Editor | 15 | 01-26-2016 01:06 PM |
Cleaning a stylesheet of unused styles | roger64 | Sigil | 49 | 06-13-2012 05:23 AM |