@
@
@Richswitch2017-09-02 17:41:19
css
@Richswitch, 2017-09-02 17:41:19

How to interpret math code from LESS to SASS?

Hey!
How to interpret math code from LESS to SASS ?
For a general idea:

&:before, &:after {
        transform-origin: 0 50%;
        width: sqrt(pow(@burger-width, 2) + pow(2*@burger-gutter, 2));
      }
      
      &:before {
        transform: rotateZ(atan(2*@burger-gutter/@burger-width));
      }
      
      &:after {
        transform: rotateZ(-1 * atan(2*@burger-gutter/@burger-width));
      }
    }
  }

This is what needs to be translated into SASS:
1) width: sqrt(pow(@burger-width, 2) + pow(2*@burger-gutter, 2));
2) transform: rotateZ(atan(2*@burger-gutter/@burger-width));
3) transform: rotateZ(-1 * atan(2*@burger-gutter/@burger-width));

Info taken from here.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Bogachev, 2017-09-02
_

Look at mathsass - all these functions are implemented there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question