W3C home > Mailing lists > Public > www-style@w3.org > January 2009

Proposal: related-units-base directive

From: Josef Schmid <e9427749@student.tuwien.ac.at>
Date: Wed, 14 Jan 2009 18:28:44 +0100
Message-ID: <496E20CC.3090107@student.tuwien.ac.at>
To: www-style@w3.org

Hi, too all!

This is a proposal to make the 'rem' unit more
useful.

For this proposal _relative_ units are different
to _related_ units.
So 'rem' is a _related_ unit, and 'em' is _relative_.

The whole idea is, that the reference point can be
change to something different as the root element.

Synopsis:
   related-units-base: <value>;
   related-units-base: <value> <value>;

Values:
   inherit .... the same as for the parent node.
                This is the default, except
                for the root element.
   root ....... the root element
   default .... browser/user default, honor
                user style-sheets for root,
                but not form author.
   sel(<css selector>) ... the css-selector
                is the base. Only selectors
                which address preceding nodes
                in document order before the context node
                (selector of the set where the rule is part of)
                are allowed. Behavior is undefined for others.
                If the selector match multiple nodes, the first
                is used.
                If the selector match the actual node it is
                ignored, but are valid for descendants if the
                inherit.
   this-for-inherits ... Make the actual node the base
                for descendant node if the inherit.
                This needs some further clarification,
                but hopefully the idea is clear.

If the directive have two values, the first value is used,
but the second is bequeathed.

----

More values that are maybe interesting:
    my-parent ... the parent of the node where the directive
                  is used.
    parent ...... the parent node, this makes the all inherits
                  _relative_.

----

Example:
div.toolbox { related-units-base: this-for-inherits;
               /* ^- identical to
                     related-units-base: inherit this-for-inherits;
               */
               font-size: 12pt;
             }
..toolbox h1 { font-size: 1.2em; }

----

Other ways to reach the intended exists, ala:
   * 'from' unit expander,
   * value-link(...),
   * unit-base for relative units + feature switch,

So if you think like me this is a issue that should be solved,
but don't like this proposal than ...

----

however, nice to hear about,
   Josef
Received on Wednesday, 14 January 2009 17:31:06 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:15 GMT