Re: [css-d] CSS border-box misbehavior?
Hi everyone! It´s still hard to debug a jpg. Can someone help me, please! Thanks, Marcos http://www.acompanhantesspvip.net.br __ 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/
Re: [css-d] CSS border-box misbehavior?
Le 6 juil. 2012 à 07:30, David Hucklesby a écrit : Two observations on box-sizing: border-box: 1. Generated content does not inherit box-sizing 2. Max-height applies to content only, not the border-box. Please play with this dabblet demo: http://dabblet.com/gist/3056829 Is this expected behavior? (I did not expect it.) Why didn't you expect 'it' – what exactly, that the 'border-box' value applied to a box (element E) is not inherited by generated content for E ? If so, that is hardly a surprise: http://www.w3.org/TR/css3-ui/#box-sizing0 says: [quote]Inherited: no[/quote] In your little demo, you specify '* { box-sizing: border-box; }' but remember, generated content is not an element. That line doesn't apply to the generated content box. As for your second point, max-height applies to the box. And you don't use max-height in your demo. Philippe -- Philippe Wittenbergh http://l-c-n.com __ 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/
Re: [css-d] CSS border-box misbehavior?
On 7/5/12 4:29 PM, Philippe Wittenbergh wrote: Le 6 juil. 2012 à 07:30, David Hucklesby a écrit : Two observations on box-sizing: border-box: 1. Generated content does not inherit box-sizing 2. Max-height applies to content only, not the border-box. Please play with this dabblet demo: http://dabblet.com/gist/3056829 Is this expected behavior? (I did not expect it.) [...] In your little demo, you specify '* { box-sizing: border-box; }' but remember, generated content is not an element. That line doesn't apply to the generated content box. Yes. I see that now. Thanks for pointing out that inheritance is not the issue, Philippe. Still don't understand _why_ the universal selector would not apply to generated content, though. As for your second point, max-height applies to the box. And you don't use max-height in your demo. Definitely my misunderstanding, as dimensions apply to the content at all times, regardless of box-sizing. After ten years of CSS I still stumble. -- Cordially, David __ 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/
Re: [css-d] CSS border-box misbehavior?
Le 6 juil. 2012 à 12:21, David Hucklesby a écrit : Still don't understand _why_ the universal selector would not apply to generated content, though. http://www.w3.org/TR/css3-selectors/#universal-selector [quote]The universal selector, written as a CSS qualified name [CSS3NAMESPACE] with an asterisk (* U+002A) as the local name, represents the qualified name of any element type [/quote] (my emphasis) It selects elements (p, div, span, etc) that exist in the DOM (document tree); generated content doesn't exist in the DOM, it is purely a CSS construct. See also http://www.w3.org/TR/CSS21/generate.html Philippe -- Philippe Wittenbergh http://l-c-n.com __ 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/