| 
			
			 | 
		#1 | 
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,305 
				Karma: 10259306 
				Join Date: May 2016 
				
				
				
				Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3   HDX8.9, 
				
				
				 | 
	
	
	
		
		
			
			 
				
				is an undefined css class an error - and is there a detecrtion tool
			 
			
			
			some context. I have been trying to better understand why/when calibre introduces the css class pcalibre1 during a conversion. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	I am asking here as sigil is my preferred investigation tool... So, looking through various books, for usage of pcalibre1, I find a book in my library which has the code <p class="pcalibre2 pcalibre1"> for 1st line of each chapter but there is no definition of pcalibre2 that I can find. Definitely not in the css sheet according to "find". Only pcalibre1 is defined, and there are no inline class definitions either so I try all the various epub check type tools in sigil to see if the missing definition gets flagged as an error - but it doesn't- and the book renders normally. I also tried the check/repair tools in the calibre editor and they do not report a missing definition either so are undefined css classes generally safe to leave in? [ just in case the definition is there, and I am just going blind, I then deliberately sabotaged the code by changing pcalibre2 to pcalibre3 - which for sure is not defined, and re ran all the checks. Every one passed OK ] I am assuming for now that I must have accidentally deleted the definition somehow, because the alternative - that calibre adds undefined classes - seems very unlikely this is the opposite of having an unused css class. its having an undefined css class is there any tool which will flag up such cases that I can use- either in sigil, or outside of ? will having undefined class(es) crash or confuse some renderers?  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,162 
				Karma: 92500001 
				Join Date: Nov 2011 
				Location: Charlottesville, VA 
				
				
				Device: Kindles 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Classes do not need to have associated CSS properties. They can be informational or used for other purposes.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#3 | |
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,305 
				Karma: 10259306 
				Join Date: May 2016 
				
				
				
				Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3   HDX8.9, 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 no need to reply if YES, but if I continue to misunderstand then please clarify  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Sigil Developer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,072 
				Karma: 6361556 
				Join Date: Nov 2009 
				
				
				
				Device: many 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Yes, and Sigil also uses them that way when marking words for inclusion in an index, marking potential headers, etc. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	In fact, for spellchecking some html software adds a "spellerror" class (with an onhover menu) although it has a css definition to do a red squiggly underline) and added spans to mark potentially misspelled words and then uses javascript to remove that class when a user marks the word as ignore or correct. That way spellchecking can be external to the browser engine because some browser spellcheck dictionaries can leave a lot to be desired. So the "misuse" of class names is one way to "mark" things in the DOM for a variety of reasons.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Running with scissors 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,592 
				Karma: 14328510 
				Join Date: Nov 2019 
				
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			It gets even more hairy when you include other attributes besides class.  See for example a book from Standard Ebooks where they use the epub attributes.  They do declare them in the namespaces (the '<html xmlns=' at the beginning of the file) but they make me nervous since my Kobo's renderer can be fragile.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#6 | 
| 
			
			
			
			 Addict 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 201 
				Karma: 266070 
				Join Date: Dec 2010 
				Location: Spain 
				
				
				Device: Win10,Win11,Ubuntu,PockbookLux44 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			However, I think that Sigil should show classes not in any css in the Reports: it would help to check for leftovers after a thorough (manual) re-format.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 Sigil Developer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,072 
				Karma: 6361556 
				Join Date: Nov 2009 
				
				
				
				Device: many 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			We will consider it but it would be very low priority as they are perfectly legal and have many uses.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#8 | 
| 
			
			
			
			 Addict 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 201 
				Karma: 266070 
				Join Date: Dec 2010 
				Location: Spain 
				
				
				Device: Win10,Win11,Ubuntu,PockbookLux44 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			And so are most things in Reports. I look at Reports, for instance, to see if there are characters or external links that 'don't belong', however correct they might be.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#9 | 
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,305 
				Karma: 10259306 
				Join Date: May 2016 
				
				
				
				Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3   HDX8.9, 
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#10 | 
| 
			
			
			
			 Sigil Developer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,072 
				Karma: 6361556 
				Join Date: Nov 2009 
				
				
				
				Device: many 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Perhaps a plugin approach might be easiest if this is something you feel is important.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
    
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| EPUB-Checker error: undefined property | Dabcar | ePub | 15 | 02-16-2020 01:49 AM | 
| Debian 9.8 VM: Calibre install, import error: undefined symbol: crypt_r | Sinac | Calibre | 3 | 03-26-2019 08:42 AM | 
| KindleGen error message: E1003 Unknown error in class String. | Doitsu | Kindle Formats | 1 | 06-25-2014 01:29 PM | 
| ADE breaks CSS --> CSS Validation: Parse Error / Value Error | dasboeh | ePub | 4 | 12-10-2012 04:25 AM | 
| PRS-600 Sony library - Error undefined | omk3 | Sony Reader | 13 | 01-22-2010 11:52 AM |