Skip to content

[v4] using variables with breakpoints #15113

Answered by philipp-spiess
xela92 asked this question in Help

You must be logged in to vote

Hey there! Unfortunately var() is not allowed inside @media queries and due to the dynamic nature of variables, we could not inline this even if we wanted, as we don't know what this is going to resolve to at runtime. So there isn't really a way to make this work.

The use case is really interesting though, we'll definitely keep this in mind but for now I do reckon you have to duplicate the breakpoint values.

Replies: 4 comments 8 replies

You must be logged in to vote
1 reply
@xela92

Answer selected by xela92

You must be logged in to vote
0 replies

You must be logged in to vote
6 replies
@wongjn

@trey

@wongjn

@xela92

@wongjn

You must be logged in to vote
1 reply
@wongjn

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

This discussion was converted from issue #15112 on November 22, 2024 16:08.