View Single Post
Old 02-20-2025, 02:02 PM   #5
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,369
Karma: 20212733
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by qntnlq View Post
Hello everyone,

Probably a noob question. Sorry about that.

I am trying to create an epub from texts found on the internet, and some chapters feature a divider, which I reproduced as an svg.
On Sigil, I can import it and use it as an image but here's the catch : I want to make it the same colour as the text (so that someone who would want to read with a different colour scheme can have a more consistent experience).

I am aware I can use "fill:currentColor", but I can't get things to work how I want them to :
  • Either I import the svg as an image, and then the fill doesn't cascade to the svg, and the image stays in black ;
  • Either I copy-paste the full svg code in the html file, and things work but my code becomes a nightmare (and it is probably inefficent) ;
  • Either I try to use (probably very badly) an href in my <use> with a , but then nothing happens.

Here's the coding situation :

This is quite infuriating and I'm out of ideas...

Hence my question : do you know a way to import an svg that will keep the current Color attribute ?
I feel like the <use> stuff could help but I must misundertand how the element works...

Anyway, thanks in advance, and have a wonderful day !


EDIT : Huh. The imgur link doesn't display the image... Here's the link
https://imgur.com/a/im-so-very-bad-epubing-ilVXkOG

This was asked just a little bit ago. Check out this thread, post 8, for the solution. Basically you need to create a mask of the svg and set that color in the CSS.

Cheers!
Turtle91 is offline   Reply With Quote