Christian Ziebarth

Archive for February 2015

Test of CSS “display: contents”

In Uncategorized on February 9, 2015 at 6:21 pm

Right now this only appears to work in the Firefox Developer Edition. display: contents is supposed to display the contents of an element but not the element itself. When working properly you will see nothing but an unstyled H1 element (except for styling it can inherit from its parent DIV), but not the DIV itself (meaning that, in this instance, if display: contents is not working you will see the green border around the one DIV in the code). See comments in the CodePen for more information.

See the Pen Tests of the CSS “display: contents” property and value by WebDevCA (@WebDevCA) on CodePen.