{"id":1156,"date":"2024-03-07T18:11:18","date_gmt":"2024-03-08T00:11:18","guid":{"rendered":"https:\/\/frontendmasters.com\/blog\/?p=1156"},"modified":"2024-03-07T18:11:18","modified_gmt":"2024-03-08T00:11:18","slug":"css-has-interactive-guide","status":"publish","type":"post","link":"https:\/\/frontendmasters.com\/blog\/css-has-interactive-guide\/","title":{"rendered":"CSS :has() Interactive Guide"},"content":{"rendered":"\n<p>You know I&#8217;m <a href=\"https:\/\/frontendmasters.com\/blog\/tag\/has\/\">a little obsessed with <code>:has()<\/code><\/a> in CSS and how useful it is. So I&#8217;m chuffed that Ahmad Shadeed made <a href=\"https:\/\/ishadeed.com\/article\/css-has-guide\/\">a killer interactive guide<\/a> with loads of great examples. The basics are so satisfying like &#8220;Does this <code>&lt;figure><\/code> have a <code>&lt;figcaption><\/code>? Yes? OK then style it differently.&#8221; And that can be leveled up to the entire page, like &#8220;Is the fixed-position footer on the page right now? Yes? Then move that icon in the lower right corner up a bit.&#8221; My favorite on this page is: &#8220;Are there two buttons? OK center them. Are there three buttons? Split them up with some flush left and some flush right.&#8221; <a href=\"https:\/\/frontendmasters.com\/blog\/quantity-queries-are-very-easy-with-css-has\/\">Quantity query!<\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>You know I&#8217;m a little obsessed with :has() in CSS and how useful it is. So I&#8217;m chuffed that Ahmad Shadeed made a killer interactive guide with loads of great examples. The basics are so satisfying like &#8220;Does this &lt;figure> have a &lt;figcaption>? Yes? OK then style it differently.&#8221; And that can be leveled up [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1167,"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":[40,7],"class_list":["post-1156","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-the-beat","tag-has","tag-css"],"acf":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/03\/figcaption-thumb.jpg?fit=1000%2C500&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/1156","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=1156"}],"version-history":[{"count":1,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/1156\/revisions"}],"predecessor-version":[{"id":1168,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/1156\/revisions\/1168"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/media\/1167"}],"wp:attachment":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/media?parent=1156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/categories?post=1156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/tags?post=1156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}