You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Ralf Siegel <ra...@audiofarm.de> on 2004/10/26 19:12:53 UTC
xlink:href as style for image-elements / CSS 3 namespace
definitions
Is it possible to define different image sources in CSS (does Batik support
it)?
Here is an example of what I'm trying accomplish: Instead of writing
<image xlink:href="imageA.png" width="100" height="100" />
for a background image, I would like to write
<image xlink:href="" width="100" height="100" />
and have the image's name externalized in a CSS-file:
image.Background {
href:"imageA.png"
}
This doesn't work obviously and CSS 3 namespace definitions are not
supported yet, right?
http://www.w3.org/TR/css3-namespace/
Any hints?
ralf ...
-------------------------------------------------------------
Ralf Siegel - Freelance Developer
Recommended Listening: Blonde Redhead - Misery Is A Butterfly
http://www.blonde-redhead.com
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
Re: xlink:href as style for image-elements / CSS 3 namespace definitions
Posted by Thomas DeWeese <Th...@Kodak.com>.
Ralf Siegel wrote:
>> No, and it won't be possible (at least for any current SVG
>> implementation) as xlink:href is an XML attribute not a CSS
>> property (the two are handled quite differently).
>
> Too bad, I was hoping that I missed something ;o(
>
> That would be really useful, no?
I wouldn't consider it so, but I'm not a huge CSS fan. ;)
>> If you are just looking to externalize the image ref you
>> could use the 'use' element:
>
> No, unfortunately that's not sufficient. Maybe I'm faking a
> href-selector using the visibility property, though that could be
> getting quite a mess.
I would just change it through script. Good modular
code is no more difficult to maintain than a stylesheet
and, at least in Batik, would be much more efficient.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
Re: xlink:href as style for image-elements / CSS 3 namespace
definitions
Posted by Ralf Siegel <ra...@audiofarm.de>.
Hi Thomas,
>>Is it possible to define different image sources in CSS (does Batik
>>support it)?
>
> No, and it won't be possible (at least for any current SVG
>implementation) as xlink:href is an XML attribute not a CSS
>property (the two are handled quite differently).
Too bad, I was hoping that I missed something ;o(
That would be really useful, no?
>If you are just looking to externalize the image ref you
>could use the 'use' element:
No, unfortunately that's not sufficient. Maybe I'm faking a href-selector
using the visibility property, though that could be getting quite a mess.
Thank you.
ralf ...
-------------------------------------------------------------
Ralf Siegel - Freelance Developer
Recommended Listening: Blonde Redhead - Misery Is A Butterfly
http://www.blonde-redhead.com
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
Re: xlink:href as style for image-elements / CSS 3 namespace definitions
Posted by Thomas DeWeese <Th...@Kodak.com>.
Ralf Siegel wrote:
> Is it possible to define different image sources in CSS (does Batik
> support it)?
No, and it won't be possible (at least for any current SVG
implementation) as xlink:href is an XML attribute not a CSS
property (the two are handled quite differently).
> Here is an example of what I'm trying accomplish: Instead of writing
>
> <image xlink:href="imageA.png" width="100" height="100" />
>
> for a background image, I would like to write
>
> <image xlink:href="" width="100" height="100" />
>
> and have the image's name externalized in a CSS-file:
If you are just looking to externalize the image ref you
could use the 'use' element:
<use xlink:href="custom.svg#background"
width="100%" height="100%"/>
custom.svg:
<symbol id="background" viewBox="0 0 100 100">
<image xlink:href="imageA.png" .../>
</symbol>
> image.Background {
> href:"imageA.png"
> }
>
> This doesn't work obviously and CSS 3 namespace definitions are not
> supported yet, right?
>
> http://www.w3.org/TR/css3-namespace/
>
> Any hints?
>
> ralf ...
>
>
> -------------------------------------------------------------
> Ralf Siegel - Freelance Developer
> Recommended Listening: Blonde Redhead - Misery Is A Butterfly
> http://www.blonde-redhead.com
> -------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org