Menu

Post image 1
Post image 2
Post image 3
Post image 4
1 / 4
0

The Importance of Native Randomness in CSS | CSS-Tricks

CSS-Tricks·CSS-Tricks·about 1 month ago
#ZUtwUkut
Reading 0:00
15s threshold

Recently, I published a story about the new random functions that have landed in CSS and how they work. In this article, we’ll explore the challenges of randomness in CSS, how the concept has evolved over time, and why this native feature is a big deal. One of the first things I wanted to do when I started developing websites was create unique experiences that changed from person to person. Just little things: a random background here, random colors there… Even small micro-interactions, like confetti or falling snow, needed some level of randomness to feel natural. And I was not alone! I soon discovered that many web developers (“webmasters,” at the time) wanted to do things like that: adding wow factors and a sense of uniqueness to their sites. But we had a problem: CSS. CSS is a declarative and deterministic language. Two characteristics that clash with the idea of natural variation: Declarative means that it focuses on the what , not the how .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More