| 
			
			 | 
		#1 | 
| 
			
			
			
			 Addict 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 333 
				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
		 
		
	
		
		
			 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,782 
				Karma: 150249619 
				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 | |
| 
         | 
    
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Running with scissors 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,592 
				Karma: 14328510 
				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  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Addict 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 333 
				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
		 
		
	
		
		
			 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | |
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,782 
				Karma: 150249619 
				Join Date: Nov 2006 
				Location: Roslindale, Massachusetts 
				
				
				Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#6 | |
| 
			
			
			
			 Addict 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 333 
				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  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#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.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#8 | |
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,782 
				Karma: 150249619 
				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.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#9 | |
| 
			
			
			
			 Addict 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 333 
				Karma: 2228060 
				Join Date: Dec 2013 
				Location: LaVernia, Texas 
				
				
				Device: kindle epub readers on android 
				
				
				 | 
	
	
	
		
		
			
			 
				
				"Remove unused rules"
			 
			Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#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 07:52 PM.  | 
||
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
    
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| remove unused CSS rules | rjwse@aol.com | Editor | 13 | 09-18-2019 10:39 AM | 
| Move incode-styles to css-stylesheet with a tool? | patrik | Workshop | 3 | 03-18-2017 03:14 PM | 
| 2.67 - Unused image file not detected by check book | DrChiper | Editor | 3 | 09-08-2016 01:06 PM | 
| Remove unused class attributes | phossler | Editor | 15 | 01-26-2016 02:06 PM | 
| Cleaning a stylesheet of unused styles | roger64 | Sigil | 49 | 06-13-2012 06:23 AM |