Skip to content
This repository has been archived by the owner on Oct 16, 2019. It is now read-only.

CSS calc function problem #195

Closed
jwasiak opened this issue Feb 1, 2018 · 2 comments
Closed

CSS calc function problem #195

jwasiak opened this issue Feb 1, 2018 · 2 comments

Comments

@jwasiak
Copy link

jwasiak commented Feb 1, 2018

width: calc(100% - 12px); is converted to width: calc(88%);

@TommyTheBlackbird
Copy link

This is about Less and not Crunch, because it's the way Less compiler resolves your formula. Which is right anyway cause Less is a css PRE-compiler, so it has no clue of how many pixels will be the 100% so it can't subtract absolute pixel value.
You are looking for a real-time CSS calculation, so it's a misconception of how Less (or Sass or others) works.

@jwasiak
Copy link
Author

jwasiak commented Feb 1, 2018

Thanks, I found the solution meantime
width: calc(~"100% - 22px");

@jwasiak jwasiak closed this as completed Feb 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants