Polymer<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"The following is a guest article by Chris Scott. Chris takes us through a great use case for the Shadow DOM. As designers, we may want to style something in a certain way, but sometimes end up having to go to war with HTML, CSS, and JS to get it done. And even then, the […]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"c2c_always_allow_admin_comments":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[4],"tags":[469],"jetpack_publicize_connections":[],"acf":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":178717,"url":"https:\/\/css-tricks.com\/swapping-svg-icons\/","url_meta":{"origin":171586,"position":0},"title":"Swapping Out SVG Icons","date":"August 12, 2014","format":false,"excerpt":"Let's say you're using inline SVG and want to change the SVG icon that is displayed in an element on state change, like changing a class or on :hover\/:focus. There are a number of ways you can approach that. Technique #1: Hide\/Show SVG Element Include both icons: Hide one by\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":305838,"url":"https:\/\/css-tricks.com\/styling-in-the-shadow-dom-with-css-shadow-parts\/","url_meta":{"origin":171586,"position":1},"title":"Styling in the Shadow DOM With CSS Shadow Parts\u00a0","date":"April 13, 2020","format":false,"excerpt":"Safari 13.1 just shipped support for CSS Shadow Parts. That means the ::part() selector is now supported in Chrome, Edge, Opera, Safari, and Firefox. We\u2019ll see why it\u2019s useful, but first a recap on shadow DOM encapsulation\u2026 The benefits of shadow DOM encapsulation I work at giffgaff where we have\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/03\/intersecting-parts.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":333234,"url":"https:\/\/css-tricks.com\/styling-web-components\/","url_meta":{"origin":171586,"position":2},"title":"Styling Web Components","date":"January 29, 2021","format":false,"excerpt":"Nolan Lawson has a little emoji-picker-element that is awfully handy and incredibly easy to use. But considering you'd probably be using it within your own app, it should be style-able so it can incorporated nicely anywhere. How to allow that styling isn't exactly obvious: What wasn\u2019t obvious to me, though,\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/01\/web-blocks.jpg?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":351915,"url":"https:\/\/css-tricks.com\/shadow-roots-and-inheritance\/","url_meta":{"origin":171586,"position":3},"title":"Shadow Roots and Inheritance","date":"September 16, 2021","format":false,"excerpt":"There is a helluva gotcha with styling a element, as documented here by Kitty Giraudel. It's obscure enough that you might never run into it, but if you do, I could see it being very confusing (it would confuse me, at least). Perhaps you're aware of the shadow DOM?\u2026","rel":"","context":"In "Link"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/09\/Screen-Shot-2021-09-15-at-3.57.50-PM.png?fit=1200%2C717&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":151172,"url":"https:\/\/css-tricks.com\/custom-controls-in-html5-video-full-screen\/","url_meta":{"origin":171586,"position":4},"title":"Hiding Native HTML5 Video Controls in Full-Screen Mode","date":"September 26, 2013","format":false,"excerpt":"The following is a guest post by Sara Soueidan. I know Sara through all her excellent work on CodePen. She was working on some custom HTML5 video controls and noticed that the customizations were lost when the video went into full screen mode (example of that happening). Digging into the\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":359938,"url":"https:\/\/css-tricks.com\/on-yak-shaving-and-md-block-a-new-html-element-for-markdown\/","url_meta":{"origin":171586,"position":5},"title":"On Yak Shaving and md-block, a new HTML element for Markdown","date":"December 29, 2021","format":false,"excerpt":"Lea Verou made a Web Component for processing Markdown. Looks like there were a couple of others out there already, but I agree with Lea in that this is a good use case for the light DOM (as opposed to the shadow DOM that is normally quite useful for web\u2026","rel":"","context":"In "Link"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/12\/MD-BLOCK.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"featured_media_src_url":null,"_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/171586"}],"collection":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/comments?post=171586"}],"version-history":[{"count":2,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/171586\/revisions"}],"predecessor-version":[{"id":171592,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/171586\/revisions\/171592"}],"wp:attachment":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media?parent=171586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/categories?post=171586"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=171586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}