Hi everyone,
I’m currently facing the following scenario in Webflow and would love to hear your thoughts and best practices:
I’ve built a blog grid as a “Component” with different Variants. In this Component there are two Variants: Light and Dark.
The simplified markup looks like this:
<div class="post_item w-dyn-item">
<a class="post_item-link w-variant-<VARIANT-ID>">…link content…</a>
<div class="post_item-content w-variant-<same-VARIANT-ID>">
…content…
</div>
</div>
Each variant has its own default background and text colors.
Desired Behavior:
On hover over the .post_item-link, only the .post_item-content should change:
Dark Variant → Content background to var(–color–background–light-dark)
Light Variant → Content background to var(–color–background–light-opacity)
Preferably solved entirely within the Component, without external embed CSS or JavaScript.
Approaches I’ve Tried
Webflow Pseudo-State (Hover) + Select child
It doesn’t work in the Component because I can’t target the content element as either a child or a sibling of the link using Webflow’s designer UI.
I’ve tried custom CSS with ~ or +
.post_item-link.w-variant-dark:hover + .post_item-content { … }
.post_item-link.w-variant-light:hover ~ .post_item-content { … }
Doesn’t pick up in my real structure, even with !important.
JavaScript in an Embed: Works perfectly via mouseenter/mouseleave, but feels like overkill when I’d prefer a pure styling solution.
Is there a way to target a sibling element purely via Webflow Designer styles (Component Variants + Pseudo-States)? - Do you have any tricks for handling sibling targeting inside a Component without external embeds? Or do you always fall back to custom code/interactions for cases like this? How do you organize and maintain that approach in larger projects?
I’m excited to hear your ideas, workarounds, or examples!
My ReadOnly Link: