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

Media queries not working properly #28

Closed
AranjuezY opened this issue Dec 7, 2024 · 1 comment · Fixed by #29
Closed

Media queries not working properly #28

AranjuezY opened this issue Dec 7, 2024 · 1 comment · Fixed by #29
Labels
bug Something isn't working

Comments

@AranjuezY
Copy link

The css variables associated to media queries are defined as --phone and --tablet. In fact, CSS media queries cannot get these two variables.
I replaced these variables with scss variables:

:root {
  /* COLOR VARIABLES */
  ...
}

/* MEDIA QUERIES */
$phone: 684px;
$tablet: 900px;

And replaced all related styles like this:

  @media (max-width: $phone) {
    font-size: 1rem;
  }

Then the styles work fine on my mobile phone.

@mirus-ua mirus-ua added the bug Something isn't working label Dec 7, 2024
@mirus-ua
Copy link
Owner

mirus-ua commented Dec 7, 2024

Hello. Thank you that you noticed.
This is a sad limitation of the native variables despite the fact that we have an active proposal to solve this issue https://drafts.csswg.org/css-env-1/
I'll do a small rollback to scss vars only for media queries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants