You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But anytime we load code with client:media, the code is displayed regardless of the media query.
What's the expected result?
When the screen width is < 769px, only the MockupMobile version should display.
When the screen width is >= 769px, only the Mockup version should display.
I think there's a bit of confusion about what client:media is for. It doesn't hide or show according to the query: it hydrates according to the query. See this demo for an example. If you need to conditionally hide or show, your best bet is to use CSS and client:visible. Closing as this is expected behaviour.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
According to the doc, we should be able to conditionally call an island or another depending on media queries.
But anytime we load code with
client:media
, the code is displayed regardless of the media query.What's the expected result?
When the screen width is < 769px, only the MockupMobile version should display.
When the screen width is >= 769px, only the Mockup version should display.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-8hmsxn97
Participation
The text was updated successfully, but these errors were encountered: