Erik Runyon 10/8/2025

CSS random()

Read Original

This article analyzes Safari's experimental, non-standard CSS random() function. It explains how the function works with min, max, and step values for numeric and color contexts, details its current limitations (e.g., not working in selectors or strings), and discusses unsupported but desired use cases like randomly selecting page elements or images. The piece compares its utility to JavaScript's Math.random().

CSS random()

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week