Skip to content

[v4] How to target screen breakpoint in CSS #16811

Answered by wongjn
subproject22 asked this question in Help
Discussion options

You must be logged in to vote

You can use the @variant directive like:

@theme {
  --my-variable: foo;
}

@layer theme {
  :root {
    @variant md {
      --my-variable: bar;
    }
  }
}

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@subproject22
Comment options

@subproject22
Comment options

@subproject22
Comment options

@wongjn
Comment options

wongjn Feb 25, 2025
Collaborator

Answer selected by subproject22
@subproject22
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants