Yes, it's always better to stick with core...

{background: url("data:image/svg+xml, <$view
tiddler="$:/core/images/chevron-right" format="urlencoded"/>") no-repeat
top left;} should work without redefining content-type,

BUT the xlmns declaration is mandatory... And is still missing :-/

cheers,

*Sylvain*
[email protected]
http://sylvain.comte.online.fr


On Mon, Nov 4, 2019 at 4:47 PM Hubert <[email protected]> wrote:

> Hi Sylvain,
>
> Most of the core icons have no type defined (image/svg+xml) AND lacks a
>> xmlns declaration (<svg xmlns="http://www.w3.org/2000/svg"; ...)
>>
>> guess it would fix this...
>>
>
> That's right, defining the type as image/svg+xml fixes this but introduces
> other issues (like being able to drag the svg element in some browsers,
> which is not always desireable/solveable through CSS) and that is why I
> would like to keep my svgs consistent with the way it's done in the core.
>
> Thanks again for your hints.
>
> Regards,
> Hubert
>
> On Monday, 4 November 2019 15:36:28 UTC, Sycom wrote:
>>
>> Hello,
>>
>> Most of the core icons have no type defined (image/svg+xml) AND lacks a
>> xmlns declaration (<svg xmlns="http://www.w3.org/2000/svg"; ...)
>>
>> guess it would fix this...
>>
>> *Sylvain*
>>
>> *@sycom*
>>
>> On Mon, Nov 4, 2019 at 1:27 PM Hubert <[email protected]> wrote:
>>
>>> Thank you! It works. However, when I tried to reference one of the
>>> built-in icons, it didn't:
>>>
>>> {background: url("<<datauri "$:/core/images/chevron-right">>") no-repeat
>>> top left;}
>>>
>>> Is there anything else that I'd need to modify? Removing the datauri
>>> part had no effect.
>>>
>>> Thanks in advance,
>>> Hubert
>>>
>>> On Wednesday, 30 October 2019 22:44:39 UTC, Magnus wrote:
>>>>
>>>> Yes you are correct, I was lazy and just copied from my stylesheet in
>>>> view mode. In edit mode it is
>>>>
>>>> .tc-tiddler-body h1:nth-child(1) {background: url("<<datauri
>>>> "image/location.svg">>") no-repeat top left;}
>>>>
>>>> Sorry for the confusion
>>>>
>>>> Den onsdag 30 oktober 2019 kl. 23:37:14 UTC+1 skrev Sycom:
>>>>>
>>>>> Hello Hubert,
>>>>>
>>>>> I think Magnus is using an urlencoded version of the svg. You can have
>>>>> it with <$view tiddler="your_tiddler” format="urlencoded" />. See
>>>>> viewWidget documentation for a double check.
>>>>>
>>>>> Cheers
>>>>>
>>>>> Sylvain
>>>>> @sycom
>>>>
>>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "TiddlyWiki" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/tiddlywiki/YznqeuiZyqQ/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/tiddlywiki/8ce30f75-5513-4121-b44c-2d490071731a%40googlegroups.com
>>> <https://groups.google.com/d/msgid/tiddlywiki/8ce30f75-5513-4121-b44c-2d490071731a%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "TiddlyWiki" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/tiddlywiki/YznqeuiZyqQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/438cd223-ff77-47c4-9a3d-d067a9065faf%40googlegroups.com
> <https://groups.google.com/d/msgid/tiddlywiki/438cd223-ff77-47c4-9a3d-d067a9065faf%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAOWAUqF5Qhjx7S-SXnEDJuixSB4ESV5z7Afv5PFTvzGd%2Be4_Aw%40mail.gmail.com.

Reply via email to