DEV Community

Cover image for How many unique CSS properties can a div have πŸ€”?
Lost Semicolon πŸ’»πŸ–±
Lost Semicolon πŸ’»πŸ–±

Posted on

6 1

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)

Sentry image

See why 4M developers consider Sentry, β€œnot bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay