CSS, the language that helps websites become so cumbersome (Joke! Kinda!), is learning some new tricks. Soon, web developers will be able to use it to perform simple math functions.
Simple may be an overstatement, as the mathematical functions CSS will gain include trigonometry. The trigonometry functions were approved in a late February meeting of the World Wide Web Consortium (W3C) CSS Working Group. Here they are:
- Tangent –
- Sine –
- Cosine –
- Arcsine –
- Arccosine –
- Square Root –
- Power of –
- Arctangent –
- Square Root (sum of squares of its argument) –
- Arctangent (of an ‘x’ and ‘y’ number) –
It’s not clear when the new features will actually be implemented. A bot published the transcript of the CSS Working Group meeting where this was discussed, where we see a proposal was set to be drafted. Browser support is also required, meaning it will take even longer for CSS trigonometry to reach ubiquity, considering the wide breadth of browsers and platforms that need to be appreciated.