<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/creating-animated-clickable-cards-with-the-has-relational-pseudo-class-egxn6i5sv" -->

---
title: Creating Animated, Clickable Cards With the :has()...
description: The CSS :has() relational pseudo class, now supported in Chrome and Safari, enables new styling patterns beyond acting as a 'parent selector.' A brief pointer...
canonical: https://daily.dev/posts/creating-animated-clickable-cards-with-the-has-relational-pseudo-class-egxn6i5sv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Creating Animated, Clickable Cards With the :has() Relational Pseudo Class | daily.dev
og:description: The CSS :has() relational pseudo class, now supported in Chrome and Safari, enables new styling patterns beyond acting as a 'parent selector.' A brief pointer...
og:url: https://daily.dev/posts/creating-animated-clickable-cards-with-the-has-relational-pseudo-class-egxn6i5sv
og:image: https://api.daily.dev/og/posts/EgxN6I5sv.png
og:image:alt: Creating Animated, Clickable Cards With the :has() Relational Pseudo Class
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating Animated, Clickable Cards With the :has() Relational Pseudo Class

**[utilitybend](https://daily.dev/sources/utilitybend)** · 1 min read · 0 upvotes · 0 comments

## Summary

The CSS :has() relational pseudo class, now supported in Chrome and Safari, enables new styling patterns beyond acting as a 'parent selector.' A brief pointer highlights how it can be used to recreate the classic clickable card UI pattern, linking to a fuller tutorial on CSS-Tricks.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://utilitybend.com/blog/creating-animated-clickable-cards-with-the-has-relational-pseudo-class>

## Questions this post answers

### Which browsers support the CSS :has() pseudo class?

Chrome and Safari fully support the CSS :has() relational pseudo class, allowing developers to select a parent element based on its children, sometimes called the 'parent selector.' Beyond parent selection, it can be used for other patterns such as building animated, clickable card components without extra JavaScript.

_Developers rolling out :has()-based UI patterns can track browser support updates on daily.dev._

## Similar posts on daily.dev

- [The CSS :has\(\) selector](https://daily.dev/posts/the-css-has-selector-csw5i3bag) · Flavio Copes · 20 upvotes · 1 comments
- [Can’t touch the DOM? Reach for :has\(\) to style any element](https://daily.dev/posts/can-t-touch-the-dom-reach-for-has-to-style-any-element-7yalpjtnd) · thoughbot · 9 upvotes · 0 comments
- [Practical CSS: Combining :has, :not, :only-child and :placeholder-shown pseudo-classes](https://daily.dev/posts/practical-css-combining-has-not-only-child-and-placeholder-shown-pseudo-classes-5gvvbff0w) · RUBYLAND · 7 upvotes · 0 comments
- [An Over-The-Top Spoiler Design with the Details Element – Frontend Masters Blog](https://daily.dev/posts/an-over-the-top-spoiler-design-with-the-details-element-frontend-masters-blog-0uqzmubnn) · Frontend Masters · 1 upvotes · 0 comments

---

Tags: [#css](https://daily.dev/tags/css), [#web-components](https://daily.dev/tags/web-components)

[View this post on daily.dev](https://daily.dev/posts/creating-animated-clickable-cards-with-the-has-relational-pseudo-class-egxn6i5sv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Creating Animated, Clickable Cards With the :has() Relational Pseudo Class","url":"https://daily.dev/posts/creating-animated-clickable-cards-with-the-has-relational-pseudo-class-egxn6i5sv","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/creating-animated-clickable-cards-with-the-has-relational-pseudo-class-egxn6i5sv"},"datePublished":"2026-09-20T07:43:21.409Z","dateModified":"2026-09-20T07:44:49.092Z","description":"The CSS :has() relational pseudo class, now supported in Chrome and Safari, enables new styling patterns beyond acting as a 'parent selector.' A brief pointer...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ad8264b4a97b9a69c2483b4d823a89a6?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ad8264b4a97b9a69c2483b4d823a89a6?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"utilitybend","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"utilitybend","logo":"https://media.daily.dev/image/upload/s--hONVFSz4--/f_auto,q_auto/v1789890196/logos/utilitybend?_a=BAMAMicg0","url":"https://daily.dev/sources/utilitybend"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/creating-animated-clickable-cards-with-the-has-relational-pseudo-class-egxn6i5sv","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"css,web-components","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"utilitybend","item":"https://daily.dev/sources/utilitybend"},{"@type":"ListItem","position":3,"name":"Creating Animated, Clickable Cards With the :has() Relational Pseudo Class"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/creating-animated-clickable-cards-with-the-has-relational-pseudo-class-egxn6i5sv#faq","mainEntity":[{"@type":"Question","name":"Which browsers support the CSS :has() pseudo class?","acceptedAnswer":{"@type":"Answer","text":"Chrome and Safari fully support the CSS :has() relational pseudo class, allowing developers to select a parent element based on its children, sometimes called the 'parent selector.' Beyond parent selection, it can be used for other patterns such as building animated, clickable card components without extra JavaScript. Developers rolling out :has()-based UI patterns can track browser support updates on daily.dev."}}]}
```

