Write for DOnations<\/a>\u00a0program.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"Oftentimes in the past, I needed to figure out how to add styles to all elements inside the container but not the hovered one. This effect requires selecting the siblings of a hovered element. I used to apply JavaScript for this, adding or removing the class that defined the proper CSS rules on mouseenter and […]<\/p>\n","protected":false},"author":288714,"featured_media":374431,"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":"A Pure CSS Gallery Focus Effect with :not by Krzysztof Gonciarz","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":[]},"categories":[4],"tags":[1506],"jetpack_publicize_connections":[],"acf":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2022\/09\/pure-css-gallery-effect-with-not-header.jpg?fit=1200%2C600&ssl=1","jetpack-related-posts":[{"id":8807,"url":"https:\/\/css-tricks.com\/hover-on-everything-but\/","url_meta":{"origin":373508,"position":0},"title":"Hover on “Everything But”","date":"March 23, 2011","format":false,"excerpt":"Hover states are easy, but what if you want to apply a hover state to every element besides the one you are hovering over? We can do it with a little trickery.","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2011\/03\/twitterhover.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":305681,"url":"https:\/\/css-tricks.com\/how-to-re-create-a-nifty-netflix-animation-in-css\/","url_meta":{"origin":373508,"position":1},"title":"How to Re-Create a Nifty Netflix Animation in CSS","date":"April 7, 2020","format":false,"excerpt":"The design for Netflix's browse page has remained pretty similar for a few years now. One mainstay component is the preview slider that allows users to scroll through content and hover on items to see a preview. One unique characteristic of the UI is its hover behavior. When a show\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/03\/netflix-carousel.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":6129,"url":"https:\/\/css-tricks.com\/more-than-one-way-delegate-edition\/","url_meta":{"origin":373508,"position":2},"title":"More than one way\u2026 (delegate\u00a0edition)","date":"April 7, 2010","format":false,"excerpt":"There was a question in the forums about affecting non-hovered items. The effect they were after is that they had an unordered list of items and when they were rolled over, they would all dim (lower opacity) except the one hovered. This can be done with CSS, using pseduo-selectors. ul\u2026","rel":"","context":"In "Advanced"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":333018,"url":"https:\/\/css-tricks.com\/scrollbars-on-hover\/","url_meta":{"origin":373508,"position":3},"title":"Scrollbars on Hover","date":"January 20, 2021","format":false,"excerpt":"First, scrollbars are a usability and accessibility thing. Second, a rule of thumb: if an area scrolls, it should have a visible scrollbar. But the web is a big place and I like tricks, so I'm going to cover the idea of only revealing them on hover. Even macOS itself\u00b9\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/01\/scrollbar-hover.jpg?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":292735,"url":"https:\/\/css-tricks.com\/dont-comma-separate-focus-within-if-you-need-deep-browser-support\/","url_meta":{"origin":373508,"position":4},"title":"Don’t comma-separate :focus-within if you need deep browser support","date":"July 24, 2019","format":false,"excerpt":"I really like :focus-within. It's a super useful selector that allows you to essentially select a parent element when any of its children are in focus. Say you wanted to reveal some extra stuff when a is hovered... div:hover .extra-stuff { \/* reveal it *\/ } That's not particularly keyboard-friendly.\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2018\/11\/keyboard-focus.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":304250,"url":"https:\/\/css-tricks.com\/selectors-explained\/","url_meta":{"origin":373508,"position":5},"title":"Selectors Explained","date":"March 2, 2020","format":false,"excerpt":"Have you ever found yourself either writing a CSS selector that winds up looking confusing as heck, or seen one while reading through someone's code? That happened to me the other day. Here's what I wrote: .site-footer__nav a:hover u003e svg ellipse:first-child { } At the end of it, I honestly\u2026","rel":"","context":"In "Link"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/02\/selectors-explained.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/373508"}],"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\/288714"}],"replies":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/comments?post=373508"}],"version-history":[{"count":5,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/373508\/revisions"}],"predecessor-version":[{"id":376013,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/373508\/revisions\/376013"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media\/374431"}],"wp:attachment":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media?parent=373508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/categories?post=373508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=373508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}