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

Aspect ratio fraction is being converted to a number #3225

Closed
bendytree opened this issue Jun 21, 2018 · 2 comments
Closed

Aspect ratio fraction is being converted to a number #3225

bendytree opened this issue Jun 21, 2018 · 2 comments

Comments

@bendytree
Copy link

bendytree commented Jun 21, 2018

On less 3.0.4 it is converting the aspect ratio in media queries to a number:

// Less 3.0.4
@media (max-aspect-ratio: 1/2) {
  .foo { color:red; }
}

// CSS
@media (max-aspect-ratio: 0.5) {
  .foo { color: red; }
}

For whatever reason, this ratio is supposed to be a fraction and not a number. So it's currently broken on Chrome, etc. Here's an example


For anyone having this issue, escaping is a good workaround:

@media (max-aspect-ratio: ~"1/2") {
  .foo { color:red; }
}
@seven-phases-max
Copy link
Member

seven-phases-max commented Jun 21, 2018

Yes, this is expected behaviour after 3.x turned @media to conform the strict-math option behavior (to unify with arithmetics handling in other contexts - #1480).

"What to do with /?" and related things are discussed at #1880.

@seven-phases-max
Copy link
Member

Closing in favour of #1880.

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

2 participants