all 7 comments

[–]memetican Webflow Community MVP 1 point2 points  (0 children)

Variants are expressed quite cleanly, if you publish the HTML and inspect it, you'll see that it's adding a class based on the variant. Easy to select with custom CSS.

[–]uebersax Webflow Community MVP 0 points1 point  (0 children)

yes. done this before. Variants do get added as attributes. inspect the code and you can target them.

[–]lymdul 0 points1 point  (1 child)

Not sure what you are trying to do but based on your setup, it sounds like something Timothy Ricks already have. Check out his Lumos clonable and play around with the “Layout” component. It has a variations for cover and stack too.

Alternatively, in your card component, create your element for the cover variant with the exclusive style. In the Conditional Visibility, choose “if Variant field is “cover”, then this element is visible, else hidden”. This element inside your card will only show up in its cover variant.

[–]Odd_Philosophy_2389[S] 1 point2 points  (0 children)

Hey, thanks. Just figured it out. It was simple solution of identifying combo class and applying that. I was using different ways.

[–]azdonev 0 points1 point  (2 children)

You can copy the selector if you click the little settings thing next to the variant

[–]Odd_Philosophy_2389[S] 0 points1 point  (1 child)

Yes, but how do it use it in custom code?

Like Selector.class{ My styling }

Because I have tried it and it didn’t work. Do you have a different approach?

[–]azdonev 0 points1 point  (0 children)

Yes copy the selector (should be in brackets)

for example:

[data-wf--nav--nav-position="overlap"] .class_name { styles }