| 
			
			 | 
		#1 | 
| 
			
			
			
			 Connoisseur 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 92 
				Karma: 50000 
				Join Date: Oct 2009 
				
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
			
			 
				
				SVG style sheets in EPUBs
			 
			
			
			My conclusion is that ADE and iBooks (webkit) reading systems are unable to read external SVG style sheets. I'm talking about this:  
		
	
		
		
		
		
		
		
		
		
		
		
	
	Code: 
	<?xml-stylesheet type="text/css" href="svg-stylesheet.css" ?> Code: 
	<style type="text/css" >
   <![CDATA[
      .someclass {
         font-size: "25px";
      }
   ]]>
</style>
Code: 
	<text font-family="Baskerville" font-size="20">Sample text</text>  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,891 
				Karma: 207182180 
				Join Date: Jan 2010 
				
				
				
				Device: Nexus 7, Kindle Fire HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			What the heck are SVG styles? 
		
	
		
		
		
		
		
		
		
		
		
		
	
	If you're talking about regular old CSS styles, then I can assure you that they work in ADE (both external and inline style sheets, as well as inline styles). I can't begin to vouch for iBooks, but I know I've heard other people mention that one works better than the other, I just don't remember which. I'm not sure what your first example is meant to be, but it's not the correct syntax for linking to an external CSS style sheet. This would be: PHP Code: 
	
			
	It's hard to tell what may be wrong with your second example without seeing what HTML you are trying to style with it. But for starters... if you're going to go the CDATA route, then make sure you take it all the way (and it should be placed in the head section): PHP Code: 
	
			
	PHP Code: 
	
			
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Connoisseur 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 92 
				Karma: 50000 
				Join Date: Oct 2009 
				
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Thank you for your reply! By SVG styles I mean the styles which can be used to style SVG elements  
		
	
		
		
		
		
		
		
		
		
		
		
	
	![]() Some styles are same as in CSS but not all. Specification: http://www.w3.org/TR/SVG/styling.html and here are some tutorials I found with quick googling: Tutorial 1 and Tutorial 2.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,891 
				Karma: 207182180 
				Join Date: Jan 2010 
				
				
				
				Device: Nexus 7, Kindle Fire HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Sorry, I got confused when you were giving examples of somewhat generic (but syntactically incorrect) CSS2 text styling situations. Even if SVG styling is supported in ePub (and I have absolutely no idea if it is), why would you be trying to use it to style basic text?
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520 
				Karma: 121692313 
				Join Date: Oct 2009 
				Location: Heemskerk, NL 
				
				
				Device: PRS-T1, Kobo Touch, Kobo Aura 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			I know that svg should be supported by ePUB readers. Most readers will render it, but not all. I wouldn't know about specific stylesheets, but I doubt it.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#6 | |
| 
			
			
			
			 Berti 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,197 
				Karma: 4985964 
				Join Date: Jan 2012 
				Location: Zischebattem 
				
				
				Device: Acer Lumiread 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Maybe chapter 2.5 at http://idpf.org/epub/20/spec/OPS_2.0.1_draft.htm" class="wikilink" title="MR Wiki entry">http://idpf.org/epub/20/spec/OPS_2.0.1_draft.htm are useful for you. There you'll find something about SVG within epub standard. Are the devices you mentioned (ADE and iBooks) "SVG-ready"? There should be something written in the manual...  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520 
				Karma: 121692313 
				Join Date: Oct 2009 
				Location: Heemskerk, NL 
				
				
				Device: PRS-T1, Kobo Touch, Kobo Aura 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			ADE-based readers can handle SVG. At least, my old PRS-300 can and that one is ADE based.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#8 | ||
| 
			
			
			
			 Connoisseur 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 92 
				Karma: 50000 
				Join Date: Oct 2009 
				
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Quote: 
	
 ![]() I have been testing my SVG elements with ADE desktop reader, Sony PRS-505 (ADE RS) and iPad. Problem is that only SVG inline styles work but not inline or external style sheets. It's quite frustrating to write into every SVG text element the same styles ![]() If I give a class for my SVG text element and style that class with normal CSS styles, some styles apply for that text element. For example, font-size works well but if I give two different font families, it doesn't work. Example: PHP Code: 
	
			
	So, I'm still wondering am I doing something wrong or have other people ran into this same problem that inline and external SVG style sheets don't work at all and normal CSS style sheets in SVG elements work variously in EPUB reading systems.  | 
||
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#9 | 
| 
			
			
			
			 Color me gone 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089 
				Karma: 1445295 
				Join Date: Apr 2008 
				Location: Central Oregon Coast 
				
				
				Device: PRS-300 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Is there a chance the thing is burping because one typeface is sans-serif and the other is serif?
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#10 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,763 
				Karma: 24088559 
				Join Date: Dec 2010 
				
				
				
				Device: Kindle PW2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Code: 
	font-family: "Baskerville", Arial; /* should work */
 | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#11 | 
| 
			
			
			
			 Enthusiast 
			
			![]() Posts: 29 
				Karma: 22 
				Join Date: Oct 2010 
				Location: London 
				
				
				Device: Kindle, iPad, iPhone 4, HTC Desire 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			With SVG it's always a good idea to keep the styling inline (i.e. on the tspan)
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#12 | 
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,613 
				Karma: 6718541 
				Join Date: Dec 2004 
				Location: Paradise (Key West, FL) 
				
				
				Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ... 
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
    
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Examples of ePubs with SVG? | wallcraft | ePub | 10 | 12-09-2011 02:21 PM | 
| style sheets | bramwell1922 | Sigil | 11 | 11-16-2011 04:05 PM | 
| Sigil Style Sheets | crutledge | Sigil | 3 | 10-06-2010 09:48 AM | 
| Mobi TOC style vs ePub style? | phearlez | Kindle Formats | 3 | 04-11-2010 07:35 AM | 
| Reference Lie, Hakon & Bos, Bert: Cascading Style Sheets, level 1. IMP. v1.0 4 Sept 2007 | DaleDe | IMP Books (offline) | 0 | 09-04-2007 03:12 PM |