DEV Community

Cover image for How many unique CSS properties can a div have ๐Ÿค”?
Lost Semicolon ๐Ÿ’ป๐Ÿ–ฑ
Lost Semicolon ๐Ÿ’ป๐Ÿ–ฑ

Posted on

How many unique CSS properties can a div have ๐Ÿค”?

There are a lot of CSS properties! But just how can a div have? Let's find out!

const element = document.createElement("div");
let  totalCssProperiesNo = 0;

_.forEach(element, function(e){
   totalCssProperiesNo++
});

console.log(totalCssProperiesNo);

You get 522! As of today.

Thanks to JavaScript teacher for his CSS Dictionary book where he ran his code last year and got 415.

Top comments (0)