Lea Verou 2020/7/7

The Cicada Principle, revisited with CSS variables

Read Original

This article revisits the Cicada Principle for web design, explaining how using prime numbers in CSS nth-of-type selectors with CSS variables can create organic-looking randomness in repeating elements. It provides a practical example of applying this technique to randomize code snippet angles using clip-path and CSS custom properties.

The Cicada Principle, revisited with CSS variables

评论

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

No top articles yet