Correct. Conceptually, the <div> exists in the style tree (so e.g. your "text-align:center" style gets inherited to the h1, via the style system, and any other inherited properties or "div > * {" style rules would affect the children as well). But the <div> does not exist in the box tree. It's replaced there with its children (just the <h1> in this case). So, the border doesn't show up, and the 'width' & 'margin' also have no effect since they're styling a box that doesn't exist.
~Daniel On 02/04/2015 12:20 PM, cmzieba...@gmail.com wrote: > I am trying to set up a CodePen to test this feature: > > http://codepen.io/WebDevCA/pen/vEeMjx > > If I understand "display:contents" properly then if it is working the green > border around the DIV can't be seen but the contents of the H1 inside that > DIV can be seen? > > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform