{"id":3892,"date":"2024-09-19T14:25:50","date_gmt":"2024-09-19T19:25:50","guid":{"rendered":"https:\/\/frontendmasters.com\/blog\/?p=3892"},"modified":"2024-09-19T14:25:51","modified_gmt":"2024-09-19T19:25:51","slug":"display-contents","status":"publish","type":"post","link":"https:\/\/frontendmasters.com\/blog\/display-contents\/","title":{"rendered":"Display Contents"},"content":{"rendered":"\n<p><a href=\"https:\/\/ishadeed.com\/article\/display-contents\/?ck_subscriber_id=2246502080\">Ahmad Shadeed on CSS <code>display: contents;<\/code><\/a> \u2014 a feature that makes the DOM pretend that element just isn&#8217;t there (but it&#8217;s children are). Anything you use it for <a href=\"https:\/\/adrianroselli.com\/2022\/07\/its-mid-2022-and-browsers-mostly-safari-still-break-accessibility-via-display-properties.html\">requires specific accessibility testing<\/a>, but it can be quite useful. There are lots of use-cases here many of which boil down to &#8220;sometimes I want all these elements to be siblings, and sometimes I want wrappers around some of them&#8221;. I like <a href=\"https:\/\/adactio.com\/journal\/21055\">Jeremy&#8217;s idea that HTML web component wrappers use this<\/a> to remove themselves from equation, if the only purpose of that web component is augmenting the content already within it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ahmad Shadeed on CSS display: contents; \u2014 a feature that makes the DOM pretend that element just isn&#8217;t there (but it&#8217;s children are). Anything you use it for requires specific accessibility testing, but it can be quite useful. There are lots of use-cases here many of which boil down to &#8220;sometimes I want all these [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3894,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[29],"tags":[49,7,53,36],"class_list":["post-3892","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-the-beat","tag-accessibility","tag-css","tag-layout","tag-web-components"],"acf":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/09\/Screenshot-2024-09-19-at-12.24.51%E2%80%AFPM.png?fit=1082%2C736&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/3892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/comments?post=3892"}],"version-history":[{"count":2,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/3892\/revisions"}],"predecessor-version":[{"id":3895,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/3892\/revisions\/3895"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/media\/3894"}],"wp:attachment":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/media?parent=3892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/categories?post=3892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/tags?post=3892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}