0
transform-origin: calc(100% - (44px / 2)) 44px / 2;

It seems to invalidate things and just makes it regress to default transform-origin: center.

The point is that I need to 'responsively' calculate the x-offset of transform-origin somehow.

2
  • The second calculation is missing the calc function. Commented Oct 17, 2017 at 12:29
  • 1
    You know what? This is actually a bad question. I meant to ask it in reference to working with Sass variables, but I substituted the literal values, so it actually looks really weird and is poorly asked. Commented Oct 17, 2017 at 12:38

2 Answers 2

1

If the last 44px / 2 wasn't a typo, delete that. That is outside the calc(). If it is a typo, can you give us some more code? Some html would be nice.

Heres a JSFiddle

Sign up to request clarification or add additional context in comments.

Comments

0

Here's what ended up working:

transform-origin: calc(100% - #{$hit-area} / 2) ($hit-area / 2);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.