Skip to main content
CSS-Tricks
  • Articles
  • Notes
  • Links
  • Guides
  • Almanac
  • Picks
  • Shuffle
Search

Articles Tagged
math

13 Articles
{
,

}
A unit circle placed on an X-Y graph at the center with the coordinates 1, 1 labelled. The resulting lines of various trigonometric functions are drawn around the coordinates.
Direct link to the article The “Most Hated” CSS Feature: asin(), acos(), atan() and atan2()
math

The “Most Hated” CSS Feature: asin(), acos(), atan() and atan2()

If we have a ratio that represents the sine, cosine or tangent of an angle, how can we get the original angle? This is where inverse trigonometric functions come in!
Image
Juan Diego Rodríguez on Nov 17, 2025
Image
Direct link to the article The “Most Hated” CSS Feature: tan()
CSS functions math

The “Most Hated” CSS Feature: tan()

Last time, we discussed that, sadly, according to the State of CSS 2025 survey, trigonometric functions are deemed the “Most Hated” CSS feature.…

Image
Juan Diego Rodríguez on Nov 3, 2025
Image
Direct link to the article tan()
math

tan()

The CSS tan() function takes a calculation that resolves to either an <angle> or <tnumber> and returns the result's tangent, which ranges between -Infinity and Infinity.
Image
Juan Diego Rodríguez on Oct 30, 2025 Updated on Nov 7, 2025
Image
Direct link to the article calc()
math

calc()

The CSS calc() function performs math between values, whether that's addition, subtraction, division, or multiplication, along with any other math function.
Image
Gabriel Shoyombo on Oct 16, 2025 Updated on Sep 25, 2025
Image
Direct link to the article CSS Typed Arithmetic
animation CSS functions math

CSS Typed Arithmetic

Starting in Chrome 140, we'll be able to calculate numeric values with mixed data types. Sounds small, but Amit demonstrates how big a deal this is, calling it Computational CSS.
Image
Amit Sheen on Sep 24, 2025 Updated on Sep 30, 2025
Image
Direct link to the article The “Most Hated” CSS Feature: cos() and sin()
animations math

The “Most Hated” CSS Feature: cos() and sin()

I want to look at practical uses for CSS trigonometric functions. And we'll start with what may be the most popular functions of the "worst" feature: sin() and cos().
Image
Juan Diego Rodríguez on Sep 15, 2025 Updated on Nov 3, 2025
Image
Direct link to the article Creating a Clock with the New CSS sin() and cos() Trigonometry Functions
cos() math sin()

Creating a Clock with the New CSS sin() and cos() Trigonometry Functions

CSS trigonometry functions are here! Well, they are if you’re using the latest versions of Firefox and Safari, that is. Having this sort of mathematical power in CSS opens up a whole bunch of possibilities. In this tutorial, I thought …

Image
Mads Stoumann on Mar 8, 2023 Updated on May 17, 2024
Image
Direct link to the article Using Absolute Value, Sign, Rounding and Modulo in CSS Today
css variables custom properties functions houdini math

Using Absolute Value, Sign, Rounding and Modulo in CSS Today

For quite a while now, the CSS spec has included a lot of really useful mathematical functions, such as trigonometric functions (sin(), cos(), tan(), asin(), acos(), atan(), atan2()), exponential functions (…

Image
Ana Tudor on Jul 28, 2021
Image
Direct link to the article Lots of Ways to Use Math.random() in JavaScript
JavaScript math random

Lots of Ways to Use Math.random() in JavaScript

Math.random() is an API in JavaScript. It is a function that gives you a random number. The number returned will be between 0 (inclusive, as in, it’s possible for an actual 0 to be returned) and 1 (exclusive, as in, …

Image
Jwahir Sundai on Nov 30, 2020
  • 1
  • 2
  • Older Image

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • About DO
  • Cloudways
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Contact
  • Write for CSS-Tricks!
  • Advertise with us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • Bluesky
Back to Top
Advertisement