How to refer to images in a stylesheet?

32 views
Skip to first unread message

stefano franchi

unread,
Feb 13, 2019, 11:15:25 AM2/13/19
to tiddly...@googlegroups.com
In this GUI viewer plugin I am writing, I would like to use images as backgrounds of certain elements. That would be easy by putting the url of the image in the proper style class, such as, e.g.

.myElement {
    background: url("../img/myElementBackground.jpg");
}

I am at a loss on the argument to url, though.
Where can i put the image and how do I refer to it? Any theme using this method?


Cheers,

Stefano

P.S. I read through this discussion on the dev group about issues with external URLs, but i would like to have them stored locally

stefano franchi

unread,
Feb 13, 2019, 11:25:20 AM2/13/19
to TiddlyWikiDev
Never mind, dataURI is the answer, as explained in the docs.

Cheers,
S.

On Wed, Feb 13, 2019 at 10:15 AM stefano franchi <stefano...@gmail.com> wrote:
In this GUI viewer plugin I am writing, I would like to use images as backgrounds of certain elements. That would be easy by putting the url of the image in the proper style class, such as, e.g.

.myElement {
    background: url("../img/myElementBackground.jpg");
}

I am at a loss on the argument to url, though.
Where can i put the image and how do I refer to it? Any theme using this method?


Cheers,

Stefano

--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/13dd8fbe-5314-4a6b-8bce-b323c8331823%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
__________________________________________________
Stefano Franchi

stefano...@gmail.com
http://stefano.cleinias.org
Reply all
Reply to author
Forward
0 new messages