{"id":64408,"date":"2019-05-01T04:20:34","date_gmt":"2019-05-01T11:20:34","guid":{"rendered":"http:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/"},"modified":"2019-05-01T04:20:34","modified_gmt":"2019-05-01T11:20:34","slug":"digging-into-the-display-property-box-generation","status":"publish","type":"post","link":"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/","title":{"rendered":"Digging Into The Display Property: Box Generation"},"content":{"rendered":"<link rel=\"canonical\" href=\"https:\/\/www.smashingmagazine.com\/2019\/05\/display-box-generation\/\"><title>Digging Into The Display Property: Box Generation<\/title><\/p>\n<article>\n<header>\n<h1>Digging Into The Display Property: Box Generation<\/h1>\n<address>Rachel Andrew<\/address>\n<p>                  <time datetime=\"2019-05-01T13:00:59+02:00\">2019-05-01T13:00:59+02:00<\/time><time datetime=\"2019-05-01T11:06:14+00:00\">2019-05-01T11:06:14+00:00<\/time><\/header>\n<p>This is the second in a short series of articles about the <code>display<\/code> property in CSS. You can read the initial article in the series at \u201c<a href=\"https:\/\/www.smashingmagazine.com\/2019\/04\/display-two-value\/\">The Two Values Of Display<\/a>\u201d. The <code>display<\/code> specification is a very useful spec to understand as it underpins all of the different layout methods we have.<\/p>\n<p>While many of the values of <code>display<\/code> have their own specification, many terms and ideas are detailed in <code>display<\/code>. This means that understanding this specification helps you to understand the specifications which essentially detail the values of <code>display<\/code>. In this article, I am going to have a look at the box generation values of <code>display<\/code> \u2014 <code>none<\/code> and <code>contents<\/code>.<\/p>\n<h3>Everything Is A Box<\/h3>\n<p>In CSS everything generates boxes. A webpage is essentially a set of block and inline boxes, something you get to understand very well if you open up DevTools in your favorite browser and start selecting elements on the page. You can see the boxes that make up the layout, and how their margins, padding and borders are applied.<\/p>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/302b6b8a-7aae-4196-a118-cd2c5fd357de\/css-inspecting-box.png?ssl=1\"><\/p>\n<p>    <img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/css-inspecting-box.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/302b6b8a-7aae-4196-a118-cd2c5fd357de\/css-inspecting-box.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/302b6b8a-7aae-4196-a118-cd2c5fd357de\/css-inspecting-box.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/302b6b8a-7aae-4196-a118-cd2c5fd357de\/css-inspecting-box.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/302b6b8a-7aae-4196-a118-cd2c5fd357de\/css-inspecting-box.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/css-inspecting-box.png?w=900\" sizes=\"100vw\" alt=\"An image of a simple layout with an unordered list highlighted in browser DevTools\"><\/a><figcaption>\n      I have highlighted the <code>ul<\/code> element using Firefox DevTools so I can inspect the different parts of the box. (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/302b6b8a-7aae-4196-a118-cd2c5fd357de\/css-inspecting-box.png\">Large preview<\/a>)<br \/>\n    <\/figcaption><\/figure>\n<h3>Controlling Box Generation<\/h3>\n<p>The <code>none<\/code> and <code>contents<\/code> values of <code>display<\/code> deal with whether boxes should appear at all. If you have elements in your markup and don\u2019t want them to generate a box in CSS then you need to somehow suppress generation of the box. There are two possible things you might want to do. Which are:<\/p>\n<ul>\n<li>Prevent generation of a box and all of its children.<\/li>\n<li>Prevent generation of a box but still display the children.<\/li>\n<\/ul>\n<p>We can take a look at each of these scenarios in turn.<\/p>\n<div data-component=\"FeaturePanel\" data-audience=\"non-subscriber\" data-remove=\"true\"><\/div>\n<h4>display: none<\/h4>\n<p>The <code>none<\/code> value of <code>display<\/code> is how we prevent the generation of a box and all the children of that box. It acts as if the element was not there at all. Therefore, it is useful in situations where you intend to completely hide that content, perhaps because it will be revealed later after activating a link.<\/p>\n<p>If I have an example with a paragraph, an unordered list, and another paragraph you can see that the items are displaying in normal flow. The <code>ul<\/code> has a background and border applied, plus some padding.<\/p>\n<figure>\n<p data-height=\"500\" data-theme-id=\"light\" data-slug-hash=\"XQGagV\" data-user=\"rachelandrew\" data-default-tab=\"result\">See the Pen <a href=\"https:\/\/www.smashingmagazine.com\/articles\/\">Box Generation example<\/a> by <a href=\"https:\/\/codepen.io\/rachelandrew\">Rachel Andrew<\/a>.<\/p><figcaption><a href=\"https:\/\/www.smashingmagazine.com\/articles\/#ZgotmplZ\">See on Codepen<\/a><\/figcaption><\/figure>\n<p>If I add <code>display: none<\/code> to the <code>ul<\/code> it disappears from the visual display, taking with it the children of the <code>ul<\/code> plus the background and border.<\/p>\n<figure>\n<p data-height=\"500\" data-theme-id=\"light\" data-slug-hash=\"VNRzzg\" data-user=\"rachelandrew\" data-default-tab=\"result\">See the Pen <a href=\"https:\/\/www.smashingmagazine.com\/articles\/\">Box Generation example display: none<\/a> by <a href=\"https:\/\/codepen.io\/rachelandrew\">Rachel Andrew<\/a>.<\/p><figcaption><a href=\"https:\/\/www.smashingmagazine.com\/articles\/#ZgotmplZ\">See on Codepen<\/a><\/figcaption><\/figure>\n<p>If you use <code>display: none<\/code> it hides the content from all users of the website. This includes screen reader users. Therefore, you should only use this if your intention is that the box and everything inside it is completely hidden to everyone.<\/p>\n<p>There are situations where you might want to add additional information for users of assistive technology like screen readers but hide it for other users; in such cases, you need to use a different technique. Some excellent suggestions are made by Scott O \u2019Hara in his article \u201c<a href=\"https:\/\/www.scottohara.me\/blog\/2017\/04\/14\/inclusively-hidden.html\">Inclusively Hidden<\/a>\u201d.<\/p>\n<p>Using <code>display: none<\/code> is therefore pretty straightforward. Use it in a situation where you want a box and contents to vanish from the display, from the box tree, and from the accessibility tree (as if it were never there in the first place).<\/p>\n<h4>display: contents<\/h4>\n<p>For the second scenario, we need to look at a much newer value of display. The value <code>display: contents<\/code> will remove the box it is applied to from the box tree in the same way that <code>display: none<\/code> does, but leave the children in place. This causes some useful behavior in terms of things we can then do in our layouts. Let\u2019s look at a simple example and then explore further.<\/p>\n<p>I am using the same example as before, but this time I have used <code>display: contents<\/code> on the <code>ul<\/code>. The list items are now visible, however, they have no background and borders and are acting as if you have added <code>li<\/code> elements to the page without any enclosing <code>ul<\/code>.<\/p>\n<figure>\n<p data-height=\"500\" data-theme-id=\"light\" data-slug-hash=\"JVzyra\" data-user=\"rachelandrew\" data-default-tab=\"result\">See the Pen <a href=\"https:\/\/www.smashingmagazine.com\/articles\/\">Box Generation example display: contents<\/a> by <a href=\"https:\/\/codepen.io\/rachelandrew\">Rachel Andrew<\/a>.<\/p><figcaption><a href=\"https:\/\/www.smashingmagazine.com\/articles\/#ZgotmplZ\">See on Codepen<\/a><\/figcaption><\/figure>\n<p>The reason that removing a box and keeping the children is useful is due to the way that other values of <code>display<\/code> behave. When we change the value of <code>display<\/code> we do so on a box and the direct children of that box, as I described in the last article. If I add <code>display: flex<\/code> to the CSS rules for an element, that element becomes a block-level box, and the direct children become flex items. The children of those flex items return to normal flow (they are not part of the flex layout).<\/p>\n<p>You can see this behavior in the next example. Here I have a containing element set to display flex, it has four direct children, three div elements and a <code>ul<\/code>. The <code>ul<\/code> has two list items. The direct children all participate in the flex layout and lay out as flex items. The list items are not direct children and so display as list items inside the box of the <code>ul<\/code>.<\/p>\n<figure>\n<p data-height=\"500\" data-theme-id=\"light\" data-slug-hash=\"yrwovX\" data-user=\"rachelandrew\" data-default-tab=\"result\">See the Pen <a href=\"https:\/\/www.smashingmagazine.com\/articles\/\">Box Generation flexbox and display: contents 1<\/a> by <a href=\"https:\/\/codepen.io\/rachelandrew\">Rachel Andrew<\/a>.<\/p><figcaption><a href=\"https:\/\/www.smashingmagazine.com\/articles\/#ZgotmplZ\">See on Codepen<\/a><\/figcaption><\/figure>\n<p>If we take this example and add <code>display: contents<\/code> to the <code>ul<\/code>, the box is removed from the visual display and now the children participate in the flex layout. You can see that they do not become direct children. They are not selected by the direct child universal selector (<code>.wrapper > *<\/code>) in the way that the div and <code>ul<\/code> elements are, and they maintain the background given to them. All that has happened is that the box of the containing <code>ul<\/code> has been removed, everything else carries on as normal.<\/p>\n<figure>\n<p data-height=\"500\" data-theme-id=\"light\" data-slug-hash=\"JVzypm\" data-user=\"rachelandrew\" data-default-tab=\"result\">See the Pen <a href=\"https:\/\/www.smashingmagazine.com\/articles\/\">Box Generation flexbox and display: contents 2<\/a> by <a href=\"https:\/\/codepen.io\/rachelandrew\">Rachel Andrew<\/a>.<\/p><figcaption><a href=\"https:\/\/www.smashingmagazine.com\/articles\/#ZgotmplZ\">See on Codepen<\/a><\/figcaption><\/figure>\n<p>This has potentially very useful implications if we consider elements in HTML which are important for accessibility and semantic data, but which generate an additional box that may prevent us from laying the content out with flex or grid layout.<\/p>\n<div><\/div>\n<h4>This Is Not A CSS \u201cReset\u201d<\/h4>\n<p>You may have noticed how one side effect of using <code>display: contents<\/code> is that the margin and padding on the element are removed. This is because they are related to the box, part of the CSS Box Model. This might lead to you think that <code>display: contents<\/code> is a good way to quickly rid yourself of the padding and margin on an element.<\/p>\n<p>This is a use that Adrian Roselli has spotted in the wild; he was concerned enough to write a detailed post explaining the problems of doing so \u2014 \u201c<a href=\"http:\/\/adrianroselli.com\/2018\/05\/display-contents-is-not-a-css-reset.html\"><code>display: contents<\/code> is not a CSS reset<\/a>.\u201d Some of the issues he raises are due to an unfortunate accessibility issue in browsers currently with display: contents which we will discuss below. However, even once those issues are resolved, removing an element from the box tree simply to rid yourself of the margin and padding is somewhat extreme.<\/p>\n<p>If nothing else, it would be problematic for the future maintenance of the site, a future developer might wonder why they didn\u2019t seem to be able to apply anything to this mysterious box \u2014 missing the fact it had been removed! If you need margin and padding to be <code>0<\/code>, do your future self a favor and set them to <code>0<\/code> in a time-honored way. Reserve use of <code>display: contents<\/code> for those special cases where you really do want to remove the box.<\/p>\n<p>It is also worth noting the difference between <code>display: contents<\/code> and CSS Grid Layout subgrid. Where <code>display: contents<\/code> completely removes the box, background, and border from the display, making a grid item a subgrid would maintain any box styling on that item, and just pass through the track sizing so that nested items could use the same grid. Find out more in my article, \u201c<a href=\"https:\/\/www.smashingmagazine.com\/2018\/07\/css-grid-2\/\">CSS Grid Level 2: Here Comes Subgrid<\/a>.\u201d<\/p>\n<h4>Accessibility Issues And display: contents<\/h4>\n<p>A serious issue currently makes <code>display: contents<\/code> not useful for the very thing it would be most useful for. The obvious cases for <code>display: contents<\/code> are those cases where additional boxes are required to add markup that makes your content more easily understood by those using screen readers or other assistive devices.<\/p>\n<p>The <code>ul<\/code> element of our list in the first <code>display: contents<\/code> CodePen is a perfect example. You <em>could<\/em> get the same visual result by flattening out the markup and not using a list at all. However, if the content was semantically a list, would be best understood and read out by a screen reader as a list, it should be marked up as one.<\/p>\n<p>If you then want the child elements to be part of a flex or grid layout, just as if the box of the <code>ul<\/code> was not there, you should be able to use <code>display: contents<\/code> to magic away the box and make it so \u2014 yet leave the semantics in place. <a href=\"https:\/\/drafts.csswg.org\/css-display\/#the-display-properties\">The specification<\/a> says that this should be the case,<\/p>\n<blockquote><p>\u201cThe <code>display<\/code> property has no effect on an element\u2019s semantics: these are defined by the document language and are not affected by CSS. Aside from the none value, which also affects the aural\/speech output and interactivity of an element and its descendants, the <code>display<\/code> property only affects visual layout: its purpose is to allow designers freedom to change the layout behavior of an element without affecting the underlying document semantics.\u201d<\/p><\/blockquote>\n<p>As we have already discussed, the <code>none<\/code> value does hide the element from screen readers, however, other values of <code>display<\/code> are purely there to allow us to change how things display <em>visually<\/em>. They should not touch the semantics of the document.<\/p>\n<p>For this reason, it took many of us by surprise to realize that <code>display: contents<\/code> was, in fact, removing the element from the accessibility tree in the two browsers (Chrome and Firefox) that had implemented it. Therefore changing the document semantics, making it so that a screen reader did not know that a list was a list once the <code>ul<\/code> had been removed using <code>display: contents<\/code>. This is a browser bug \u2014 and a serious one at that.<\/p>\n<div><\/div>\n<p>Last year, Hidde de Vries wrote up this issue in his post \u201c<a href=\"https:\/\/hiddedevries.nl\/en\/blog\/2018-04-21-more-accessible-markup-with-display-contents\">More Accessible Markup with <code>display:contents<\/code><\/a>\u201d and helpfully raised issues against the various browsers in order to raise awareness and get them to work on a fix. <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1455357#c32\">Firefox have partially fixed the problem<\/a>, although issues still exist <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1500958\">with certain elements such as button<\/a>. The issue is being actively worked on in <a href=\"https:\/\/bugs.chromium.org\/p\/chromium\/issues\/detail?id=835455\">Chrome<\/a>. There is also an issue for <a href=\"https:\/\/bugs.webkit.org\/show_bug.cgi?id=185679\">WebKit<\/a>. I\u2019d encourage you to star these bugs if you have use cases for display: contents that would be impacted by the issues.<\/p>\n<p>Until these issues are fixed, and the browser versions which exhibited the issue fall out of use, you need to be very careful when using display: contents on anything which conveys semantic information and needs to be exposed to assistive technology. As <a href=\"http:\/\/adrianroselli.com\/2018\/05\/display-contents-is-not-a-css-reset.html\">Adrian Roselli states<\/a>,<\/p>\n<blockquote><p>\u201cFor now, please only use display: contents if you are going to test with assistive technology and can confirm the results work for users.\u201d<\/p><\/blockquote>\n<p>There are places where you can safely use <code>display: contents<\/code> without this concern. One would be if you need to add additional markup to create fallbacks for your grid of flex layouts in older browsers. Browsers which support <code>display: contents<\/code> also support grid and flexbox, therefore you could <code>display: contents<\/code> away the redundant <code>div<\/code> elements added. In the example below, I have created a float based grid, complete with row wrappers.<\/p>\n<p>I then use <code>display: contents<\/code> to remove the row wrappers to allow all of the items to become grid items and therefore be able to be part of the grid layout. This could give you an additional tool when creating fallbacks for advanced layouts in that if you do need to add extra markup, you can remove it with display: contents when doing your grid or flex layout. I don\u2019t believe this usage should cause any issues \u2014 although if anyone has better accessibility information than me and can point out a problem, please do that in the comments.<\/p>\n<figure>\n<p data-height=\"500\" data-theme-id=\"light\" data-slug-hash=\"PgLJPb\" data-user=\"rachelandrew\" data-default-tab=\"result\">See the Pen <a href=\"https:\/\/www.smashingmagazine.com\/articles\/\">Removing row wrappers with display: contents<\/a> by <a href=\"https:\/\/codepen.io\/rachelandrew\">Rachel Andrew<\/a>.<\/p><figcaption><a href=\"https:\/\/www.smashingmagazine.com\/articles\/#ZgotmplZ\">See on Codepen<\/a><\/figcaption><\/figure>\n<h3>Wrapping Up<\/h3>\n<p>This article has taken a look into the box generation values of the <code>display<\/code> property. I hope you now understand the different behavior of <code>display: none<\/code> \u2014 which removes a box and all children completely, and <code>display: contents<\/code> which removes just the box itself. You also should understand the potential issues of using these methods where accessibility is concerned.<\/p>\n<div>\n  <img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/logo-red.png?w=900\" alt=\"Smashing Editorial\"><span>(il)<\/span>\n<\/div>\n<\/article>\n<p class=\"wpematico_credit\"><small>Powered by <a href=\"http:\/\/www.wpematico.com\" target=\"_blank\">WPeMatico<\/a><\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Digging Into The Display Property: Box Generation Digging Into The Display Property: Box Generation Rachel Andrew 2019-05-01T13:00:59+02:002019-05-01T11:06:14+00:00 This is the second in a short series of articles about the display property in CSS. You can read the initial article in the series at \u201cThe Two Values Of Display\u201d. The display specification is a very useful&#8230;<a class=\"moretag\" href=\"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/\"> Read the full article&#8230;<\/a><\/p>\n","protected":false},"author":4,"featured_media":64409,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[371],"tags":[],"class_list":["post-64408","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-user-experience"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Digging Into The Display Property: Box GenerationDigging Into The Display Property: Box Generation Rachel Andrew 2019-05-01T13:00:59+02:002019-05-01T11:06:14+00:00This is the second in a short series of articles about the display property in CSS. You can read the initial article in the series at \u201cThe Two Values Of Display\u201d. The display specification is a very useful spec to\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Guest Contribution\"\/>\n\t<meta name=\"keywords\" content=\"user experience\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Design for Immersive Technologies | User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Digging Into The Display Property: Box Generation | Design for Immersive Technologies\" \/>\n\t\t<meta property=\"og:description\" content=\"Digging Into The Display Property: Box GenerationDigging Into The Display Property: Box Generation Rachel Andrew 2019-05-01T13:00:59+02:002019-05-01T11:06:14+00:00This is the second in a short series of articles about the display property in CSS. You can read the initial article in the series at \u201cThe Two Values Of Display\u201d. The display specification is a very useful spec to\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-05-01T11:20:34+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-05-01T11:20:34+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Digging Into The Display Property: Box Generation | Design for Immersive Technologies\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Digging Into The Display Property: Box GenerationDigging Into The Display Property: Box Generation Rachel Andrew 2019-05-01T13:00:59+02:002019-05-01T11:06:14+00:00This is the second in a short series of articles about the display property in CSS. You can read the initial article in the series at \u201cThe Two Values Of Display\u201d. The display specification is a very useful spec to\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/digging-into-the-display-property-box-generation\\\/#article\",\"name\":\"Digging Into The Display Property: Box Generation | Design for Immersive Technologies\",\"headline\":\"Digging Into The Display Property: Box Generation\",\"author\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.taterboy.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/05\\\/css-inspecting-box.png?fit=400%2C335&ssl=1\",\"width\":400,\"height\":335},\"datePublished\":\"2019-05-01T04:20:34-07:00\",\"dateModified\":\"2019-05-01T04:20:34-07:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/digging-into-the-display-property-box-generation\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/digging-into-the-display-property-box-generation\\\/#webpage\"},\"articleSection\":\"User Experience\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/digging-into-the-display-property-box-generation\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.taterboy.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/user-experience\\\/#listItem\",\"name\":\"User Experience\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/user-experience\\\/#listItem\",\"position\":2,\"name\":\"User Experience\",\"item\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/user-experience\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/digging-into-the-display-property-box-generation\\\/#listItem\",\"name\":\"Digging Into The Display Property: Box Generation\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/digging-into-the-display-property-box-generation\\\/#listItem\",\"position\":3,\"name\":\"Digging Into The Display Property: Box Generation\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/user-experience\\\/#listItem\",\"name\":\"User Experience\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#organization\",\"name\":\"Design for Immersive Technologies\",\"description\":\"User Experience for Games, Virtual Reality (VR) and Augmented\\\/Mixed Reality (AR\\\/MR)\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/\",\"name\":\"Guest Contribution\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/digging-into-the-display-property-box-generation\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d2aad73eb0f48c67b141e9fc978a0e498969791ed623346e361d02d19775b0bb?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Guest Contribution\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/digging-into-the-display-property-box-generation\\\/#webpage\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/digging-into-the-display-property-box-generation\\\/\",\"name\":\"Digging Into The Display Property: Box Generation | Design for Immersive Technologies\",\"description\":\"Digging Into The Display Property: Box GenerationDigging Into The Display Property: Box Generation Rachel Andrew 2019-05-01T13:00:59+02:002019-05-01T11:06:14+00:00This is the second in a short series of articles about the display property in CSS. You can read the initial article in the series at \\u201cThe Two Values Of Display\\u201d. The display specification is a very useful spec to\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/digging-into-the-display-property-box-generation\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.taterboy.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/05\\\/css-inspecting-box.png?fit=400%2C335&ssl=1\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/digging-into-the-display-property-box-generation\\\/#mainImage\",\"width\":400,\"height\":335},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/digging-into-the-display-property-box-generation\\\/#mainImage\"},\"datePublished\":\"2019-05-01T04:20:34-07:00\",\"dateModified\":\"2019-05-01T04:20:34-07:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/\",\"name\":\"Design for Immersive Technologies\",\"description\":\"User Experience for Games, Virtual Reality (VR) and Augmented\\\/Mixed Reality (AR\\\/MR)\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Digging Into The Display Property: Box Generation | Design for Immersive Technologies","description":"Digging Into The Display Property: Box GenerationDigging Into The Display Property: Box Generation Rachel Andrew 2019-05-01T13:00:59+02:002019-05-01T11:06:14+00:00This is the second in a short series of articles about the display property in CSS. You can read the initial article in the series at \u201cThe Two Values Of Display\u201d. The display specification is a very useful spec to","canonical_url":"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/","robots":"max-image-preview:large","keywords":"user experience","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/#article","name":"Digging Into The Display Property: Box Generation | Design for Immersive Technologies","headline":"Digging Into The Display Property: Box Generation","author":{"@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author"},"publisher":{"@id":"https:\/\/www.taterboy.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/css-inspecting-box.png?fit=400%2C335&ssl=1","width":400,"height":335},"datePublished":"2019-05-01T04:20:34-07:00","dateModified":"2019-05-01T04:20:34-07:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/#webpage"},"isPartOf":{"@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/#webpage"},"articleSection":"User Experience"},{"@type":"BreadcrumbList","@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.taterboy.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/#listItem","name":"User Experience"}},{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/#listItem","position":2,"name":"User Experience","item":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/#listItem","name":"Digging Into The Display Property: Box Generation"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/#listItem","position":3,"name":"Digging Into The Display Property: Box Generation","previousItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/#listItem","name":"User Experience"}}]},{"@type":"Organization","@id":"https:\/\/www.taterboy.com\/blog\/#organization","name":"Design for Immersive Technologies","description":"User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)","url":"https:\/\/www.taterboy.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author","url":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/","name":"Guest Contribution","image":{"@type":"ImageObject","@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/d2aad73eb0f48c67b141e9fc978a0e498969791ed623346e361d02d19775b0bb?s=96&d=mm&r=g","width":96,"height":96,"caption":"Guest Contribution"}},{"@type":"WebPage","@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/#webpage","url":"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/","name":"Digging Into The Display Property: Box Generation | Design for Immersive Technologies","description":"Digging Into The Display Property: Box GenerationDigging Into The Display Property: Box Generation Rachel Andrew 2019-05-01T13:00:59+02:002019-05-01T11:06:14+00:00This is the second in a short series of articles about the display property in CSS. You can read the initial article in the series at \u201cThe Two Values Of Display\u201d. The display specification is a very useful spec to","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.taterboy.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/#breadcrumblist"},"author":{"@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author"},"creator":{"@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/css-inspecting-box.png?fit=400%2C335&ssl=1","@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/#mainImage","width":400,"height":335},"primaryImageOfPage":{"@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/#mainImage"},"datePublished":"2019-05-01T04:20:34-07:00","dateModified":"2019-05-01T04:20:34-07:00"},{"@type":"WebSite","@id":"https:\/\/www.taterboy.com\/blog\/#website","url":"https:\/\/www.taterboy.com\/blog\/","name":"Design for Immersive Technologies","description":"User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.taterboy.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Design for Immersive Technologies | User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)","og:type":"article","og:title":"Digging Into The Display Property: Box Generation | Design for Immersive Technologies","og:description":"Digging Into The Display Property: Box GenerationDigging Into The Display Property: Box Generation Rachel Andrew 2019-05-01T13:00:59+02:002019-05-01T11:06:14+00:00This is the second in a short series of articles about the display property in CSS. You can read the initial article in the series at \u201cThe Two Values Of Display\u201d. The display specification is a very useful spec to","og:url":"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/","article:published_time":"2019-05-01T11:20:34+00:00","article:modified_time":"2019-05-01T11:20:34+00:00","twitter:card":"summary","twitter:title":"Digging Into The Display Property: Box Generation | Design for Immersive Technologies","twitter:description":"Digging Into The Display Property: Box GenerationDigging Into The Display Property: Box Generation Rachel Andrew 2019-05-01T13:00:59+02:002019-05-01T11:06:14+00:00This is the second in a short series of articles about the display property in CSS. You can read the initial article in the series at \u201cThe Two Values Of Display\u201d. The display specification is a very useful spec to"},"aioseo_meta_data":{"post_id":"64408","title":null,"description":null,"keywords":null,"keyphrases":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_custom_image_width":null,"og_custom_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"created":"2021-02-07 20:33:36","updated":"2026-09-01 09:43:26","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"twitter_image_url":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.taterboy.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/\" title=\"User Experience\">User Experience<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tDigging Into The Display Property: Box Generation\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.taterboy.com\/blog"},{"label":"User Experience","link":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/"},{"label":"Digging Into The Display Property: Box Generation","link":"https:\/\/www.taterboy.com\/blog\/2019\/05\/digging-into-the-display-property-box-generation\/"}],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8wzr5-gKQ","jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/css-inspecting-box.png?fit=400%2C335&ssl=1","_links":{"self":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/posts\/64408","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/comments?post=64408"}],"version-history":[{"count":0,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/posts\/64408\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/media\/64409"}],"wp:attachment":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/media?parent=64408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/categories?post=64408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/tags?post=64408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}