Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Responsive Custom Variants #494

Closed
summer-jordan opened this issue Oct 5, 2021 · 0 comments
Closed

Responsive Custom Variants #494

summer-jordan opened this issue Oct 5, 2021 · 0 comments

Comments

@summer-jordan
Copy link

I am trying to use a custom variant in conjunction with a responsive variant. The custom variant works fine but when coupled with a responsive variant, it does not.

The custom variant code:

export const childCombinator = createPlugin(({ addVariant }) => {
  addVariant('child', ({ modifySelectors }) => {
    return modifySelectors(({ className }) => {
      console.log(className)
      return `.parent > .${className}`
    })
  })
})

When used in the following way, hidden is applied to the child element but block is not applied above the md breakpoint.

<div class="parent">
  <div class="child:hidden md:child:block"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant