Am 09.02.2012 11:05 schrieb Jukka K. Korpela:
2012-02-09 11:54, Markus Ernst wrote:
I encountered that rounded corners do not seem to apply to child
elements:
Right.
Is this the expected behavior? I did not find anything on the behavior
of child elements in the spec:
http://www.w3.org/TR/2011/CR-css3-background-20110215/#the-border-radius
It is the expected behavior. "Inherited: no" means that setting
border-radius on an element affects that element's border only. You
would need to set it explicitly on any element for which it is desired.
Thanks a lot for your quick answer. There seems to be a special case of
inheritation here to me. If a property is inherited, it would mean that
child elements get the same property, which is not desired in the case
of rounded corners (as any border). In my example, the container element
makes a box, which contains the inner element:
<div class="roundCorners">
<div>Hello</div>
</div>
Now, if there is a border applied to the container element, the inner
element is not expected to inherit the border, but it is expected to be
placed inside the border, rather than covering it.
In the case of rounded corners, I would accordingly expect the inner
element to be rounded at the edges of the outer element, rather than
covering the rounded corners (and even covering a possible border of the
container element at the corners).
Do you think it would make sense to raise this in www-style?
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/