AW: About selection on propierties based on itself (that is, prop ierties as selectors)

IMHO you've got something wrong here.

There is no precedence by any priority in this example. The "margin-left"
property is just written *behind* the other property. They both apply for
the same set of elements, so the last one wins. It's just like writing files
with the same name on a disk - the last one wins.

Imagine shorthand properties as being simple macros which are expanded by
the parser before any interpretation takes place. They just aren't
recognised as independent element.

------------------------------------------------------------------------
Von: Ignacio Javier [mailto:igjav@ctv.es]
Gesendet am: Donnerstag, 29. Juli 1999 11:18
An: www-style@w3.org
Betreff: RE: About selection on propierties based on itself (that is,
propierties as selectors)

Then why suppose that the human have failed instead of not?. I mean: why is
more logical this estructure of overriding by precedence than by , let's
say, propierties as selectors?(reckognizing that in this way it loses the
meaning of shorthand propierty)

In the example it would be:

whatever {margin-left:2em;margin:2pt} <=> whatever
{margin-left:2em;margin-top:2pt;margin-right:2pt;margin-bottom:2pt}


> Margin is a shorthand property, it sets four properties at once. The
> above actually means:
>
>     whatever {margin-left:2em}
>     whatever {margin-top:2pt}
>     whatever {margin-right:2pt}
>     whatever {margin-bottom:2pt}
>     whatever {margin-left:2pt}
>
> So the first 'margin-left' is lost because the last one takes
> precedence.

Received on Friday, 30 July 1999 14:21:53 UTC