So apparently there are no solution to what I want to do.
It means I will have to "manually" copy the widths and heights into each svg
element in my file.
For the context, each svg element contains the representation of a card, and
all those svg elements make a deck of cards. Why an svg elements and not a
group <g> ? Because I can then define position of everything inside with
percentage.

In my case, let's try to turn the problem upside-down:

if I have a <svg> element, can I force it's size to be the one of an object
it contains ? For example I put a rectangle inside a <svg> as my first
element, can the dimensions of <svg> forced to be the dimensions of this
<rect>

Cheers,
David

(for a work in progress, see http://svg-cards.sf.net. The website is not
done yet).

On Thu, Aug 12, 2010 at 19:49, Smailus, Thomas O <
[email protected]> wrote:

>
>
> So it appears the answer is NO, because the groups didn't really have a
> strong feel about it in the early stages of developing the standards. Am I
> reading that right?
>
> Its even more confusing in light of the fact that in English, property and
> attribute are somewhat synonymous terms: "In computing, an attribute is a
> specification that defines a property of an object, element, or
> file."[Wikipedia - Attribute(computing)]
>
> It seems I don't subscribe to www-svg or www-css (or whatever the lists
> are), so I'll respond here. I have seen some discussion about how SVG's
> animations are problematic because not all of SVG's features are expressed
> as CSS properties. For example, 'x', 'y', 'width', 'height' and
> 'transform'. Why not just change the SVG spec (1.1.1?) to make them into
> (non-inheritable) properties? Implementations of SVG that supports SMIL
> have to unify attributes and properties anyway in order to hook into the
> animation engine. In the early days of the SVG WG when we decided which
> things would be properties and which would be attributes, most of us didn't
> really have strong convictions behind those distinctions.
>
> Jon
>
> Thomas
> --
> Thomas Smailus, Ph.D., P.E.
> Boeing Research & Technology
>
> Tel: 425/373-2850
> Mobile: 347/SMAILUS
>
> From: [email protected] 
> <svg-developers%40yahoogroups.com>[mailto:
> [email protected] <svg-developers%40yahoogroups.com>] On
> Behalf Of Jacob Beard
> Sent: Thursday, August 12, 2010 09:22
> To: [email protected] <svg-developers%40yahoogroups.com>
> Subject: Re: [svg-developers] height and width in svg element
>
>
> Hi David,
>
> See Jon Ferallio's comments about attributes vs. CSS properties in SVG
> here:
>
> http://tech.groups.yahoo.com/group/svg-developers/message/61991
>
> Jake
>
> On 10-08-11 09:28 AM, David Bellot wrote:
> >
> > Hi again,
> >
> > today I've got plenty of questions for you, SVG fellows...
> >
> > I wrote this simple file but I don't get what I expected. I want my svg
> > element to get its dimensions from the CSS. But it doesn't get it.
> > Therefore the rectangle I put takes 100% of the screen.
> > If I put the dimensions directly into the svg element, then it works.
> >
> > <?xml version="1.0" standalone="no"?>
> > <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "
> > http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
> >
> > <svg version="1.1" xmlns="http://www.w3.org/2000/svg"; xmlns:xlink="
> > http://www.w3.org/1999/xlink";>
> >
> > * <style type="text/css">
> > <![CDATA[
> > svg.mybox {
> > height: 5cm;
> > width: 3cm;
> > }
> > ]]>
> > </style>*
> >
> > <defs>
> > <rect id="yellowbox" height="100%" width="100%" fill="yellow"/>
> > </defs>
> >
> > * <svg class="mybox">
> > <use xlink:href="#yellowbox"/>
> > </svg>*
> > </svg>
> >
> > Any help on this would be greatly appreciated.
> > David
> >
> > --
> > David Bellot, PhD
> > [email protected] <david.bellot%40gmail.com><mailto:
> david.bellot%40gmail.com <david.bellot%2540gmail.com>> <mailto:
> david.bellot%40gmail.com <david.bellot%2540gmail.com>>
>
> > http://david.bellot.free.fr
> >
> > [Non-text portions of this message have been removed]
> >
> >
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
>  
>



-- 
David Bellot, PhD
[email protected]
http://david.bellot.free.fr


[Non-text portions of this message have been removed]



------------------------------------

-----
To unsubscribe send a message to: [email protected]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
----Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to