The $:/core/images/file needs to have some namespace stuff after <svg... I 
just pasted in the namespace from the fishes 
(xmlns="http://www.w3.org/2000/svg"; xmlns:xl="http://www.w3.org/1999/xlink"; 
). And it needs to have the type, which is unset by default, set to 
images/xml+svg .

I don't know if these changes will "spoil" $:/core/images/file for some 
other use, so it might be safer to clone the tiddler, make the changes to 
the clone, and then use the clone.

As an aside, I just discovered that tw.com is a real web site, and has 
nothing to do with TiddlyWiki.

-- Mark

On Wednesday, November 14, 2018 at 2:23:15 PM UTC-8, Magnus wrote:
>
> I can't get this to work. I have this in my stylesheet:
>
> \rules only filteredtranscludeinline transcludeinline macrodef 
> macrocallinline macrocallblock
>
> /* First Caracter */
>
> html body.tc-body h1:nth-child(1) {
>     background: url("<<datauri "$:/core/images/file">>") top left 
> no-repeat;
>     padding-left: 50px;
> }
>
> ...and the H1 is moved correct but no image
>
> Den söndag 11 november 2018 kl. 18:25:03 UTC+1 skrev Jeremy Ruston:
>>
>> Hi Hubert
>>
>> Try the following in a new tiddler tagged $:/tags/Stylesheet on tw.com:
>>
>> \rules only filteredtranscludeinline transcludeinline macrodef 
>> macrocallinline macrocallblock
>>
>> html body.tc-body {
>> background: url("<<datauri "Tiddler Fishes.svg">>") center center;
>> }
>>
>> Best wishes
>>
>> Jeremy
>>
>> On Wednesday, October 24, 2018 at 11:03:07 AM UTC+1, Hubert wrote:
>>>
>>> I'm having a problem showing an SVG image using the CSS content 
>>> property. The SVG image is a separate tiddler type image/svg+xml and 
>>> the CSS style is in a separate tiddler type text/css and tagged 
>>> $:/tags/Stylesheet.
>>>
>>> Has anyone been successful displaying an image in this way? I'd be 
>>> grateful if you could show me what's wrong with my syntax:
>>>
>>> content: url("[[delete.svg]]");
>>>
>>>
>>> Thank you!
>>>
>>> Best regards,
>>> Hubert
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0be03573-c5f5-421b-a2ec-48179bbf4da4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to