How to calc square root in stylus
问题 Is there a way to get Stylus calculate the square root of x ? You know, like JavaScript's Math.sqrt(x) does. I am creating a diamond that should be centered on it's origin. the following code am i using at the moment: vendor(prop, args...) -webkit-{prop} args -moz-{prop} args -o-{prop} args -ms-{prop} args rotate(r) vendor('transform', unquote('rotate('+r+')')) rotate r .diamond display block width 7ex height @width line-height @height rotate(-45deg) /* calc offset of a rotated square *