Setting SVG image styles via CSS.
I've been experimenting with setting the styles in an SVG image via a style sheet. The attached EPUB is hopefully self-explanatory. It contains 4 cases, starting with setting SVG styles via SVG presentation attributes and gradually working towards setting the styles with CSS and eventually separating them out to the EPUB's style sheet.
The first 3 cases behave as expected. Case 4 is broken. This might be due to a bug in Sigil, but I'm new at coding EPUB documents, so it's far more likely that I've made an error in the coding. But after a week of staring at my code, I'm not making any progress. Can anyone spot my error?
Incidentally, the comment that the first 3 cases behave as expected is true when viewing the EPUB in Sigil, Calibre and Gnome Books. Curiously, FBReader and Sumatra were unable to display any of the 4 SVG images, and Okular only managed to partially display some of them. I'm not sure whether that is due to me making a coding error that caused them to choke, or limitations of those apps.
|