The “Most Hated” CSS Feature: tan()
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
Explores practical applications of CSS's tan() trigonometric function, demonstrating how to create polygon-shaped layouts and circular menus by calculating triangle dimensions. Shows how tan() works with right-angled triangles to determine element heights based on angles and widths, enabling dynamic sectioned lists, character pickers, and image galleries. Includes interactive examples and mathematical explanations of how tangent relates to sine and cosine in the unit circle.

Table of contents
The mathematical definitionSectioned liststan() in the wildBonus: Tangent in a unit circleMore trigonometry to come!Sort: