I am trying to use, and then change, the left property value of my left-hand sidebar as though it were a memory variable unsuccessfully. My basic algorithm is
left = (left * (-1) - 250)
Initial value of left is 0.
step #1: If left (value) is 0; then left should become -250.
step #2: If left (new value) is -250; left should then become 0.
step #3: go to step #1
Try this in a spreadsheet where left is the value of the preceding row. Your result rows should look like this:
-250
0
-250
I am effectively trying to toggle the left value from 0 to -250 then back to 0. So that my left hand sidebar is either "on" or "off" canvas as determined by the left: value.
I have tried many variations of calc, including
@leftr: 0; is set at the beginning of of my CSS sheet.
@negtv: -1; also set at the beginning of my CSS sheet.
....
@leftr: -webkit-calc(~"((@leftr * @negtv) - 250)"); /* slide-in/out 0 or -250 */
left: @leftr;
I hope this is clearer than mud and that you guys can help me? Thanks in advance