CodeinWP CodeinWP

A Data-based Analysis of the CSS Standards Approval Process

I recently did a complete overhaul of my CSS Values info-app. The design is basically the same, with some minor adjustments. But the website is now using a MySQL database to store all the info (as opposed to throwing everything into plain HTML) and it now includes browser support charts for every CSS property.

Much of the info is probably in need of improvement, but there’s something significant I noticed when transferring the data from the HTML to the database. It turns out, a certain bias exists with the types of properties that the W3C has approved, and I think we can use this information to speed up the standards process in the future.

Notice this table, explained below:

Letter # of properties
a 13
b 50
c 19
c 2
e 1
f 19
g 0
h 3
i 3
j 1
k 0
l 8
m 9
n 0
o 14
p 12
q 1
r 2
s 0
t 28
u 1
v 2
w 7
x 0
y 0
z 1

In the left column we have all the letters of the English alphabet. On the right, next to each letter, I’ve listed the number of CSS properties that begin with that letter.

There are other properties that are more cutting edge that I haven’t included yet, but the entire database currently has 196 properties listed along with their respective values.

Killer Bs?

From this data, it’s pretty telling that the vendors and the W3C have a bias, whether intentional or subconscious, that has led them to implement and approve properties that begin with certain letters more often than other letters.

The letter that stands out most is, as you can see, the letter “b”. There are 50 CSS properties listed in my CSS Values database that begin with the letter “b”. That means the “b” properties make up about 26% of all CSS properties. That is, a single letter in the English alphabet (1/26) accounts for about a quarter of all CSS properties.

Other telling examples include the letters “c”, “f”, “o”, and “t”, each of which have at least 14 properties that have reached a significant level in the standards process. And what about the letter “s”? This is one of the most commonly used consonants in the English language yet there is not a single CSS property that begins with that letter.

Working With the Data for Future Standards

After analyzing this information, specification authors and feature implementors should think carefully about new CSS features and use these commonly approved beginning-letters as a basis for future submissions, edits, and implementations. Let’s look at some examples.

There’s a brand new property called scroll-snap-type. Clearly, as it is named right now, this property is never going to make it to Candidate Recommendation status — because it begins with an “s”. We can fix that.

Here is my proposal:

.example {
  bro-scroll-snap-type: mandatory;
}

Here all I’ve done is prefix the property with the word “bro”. This single improvement has now increased this property’s odds of being approved and implemented from zero to 25%. The data from the table above backs this up.

Let’s look at another example, the voice-pitch property. Here’s my suggested improvement:

.example {
  baked-beans-voice-pitch: medium;
}

With the addition of “baked-beans-” this property has switched from a two-property approved letter (“v”) to the clear W3C favourite (“b”). There’s no question that, with this improvement, it can’t miss.

Another new one is the max-lines property. “M” isn’t bad; it has 9 in the database so far. But let’s make it better:

.example {
  borked-max-lines: 3;
}

Boom. An improvement of 20%. In no time at all, the borked-max-lines property will be appearing in slide decks at CSS conferences the world over.

In Summary

The data doesn’t lie, people. But I won’t be too dogmatic about this. After all, I’m not a spec editor. I’m not denying that there are many secondary and peripheral factors that will determine if a CSS feature is implemented by browsers and ultimately approved through the standards process.

Also, I’m not trying to push the letter “b” to promote some personal agenda. I know there are other letters that the W3C likes, too. Like “a”. And “c”. And “t”. If I were to write an article promoting CSS properties that begin with the letter “b” only, ignoring the rest of the data, that would be pretty stupid.

5 Responses

  1. Luc says:

    Well, it is a really flawed analysis. If threre is a biais, it could be that :
    – tech keywords does not share the same distribution as English;
    – the biais is shared by both the people proposing and accepting features;
    – a lot of keywords starts with the same word (border-left…, border-right…), etc.

  2. Ryan Keefer says:

    I appreciate the analysis and thought, and maybe I didn’t read carefully enough, but so what if there’s bias in the first character?

    Is it an issue with code completion in IDEs being slowed or less useful with so many properties using the same leading character?

    I feel like I’m missing something — why it matters.

  3. Scott says:

    Dammit, I was expecting some interesting analysis but instead you took me by surprise and made me laugh my head off. Thanks.

  4. adam says:

    Thanks for the funny analysis of the distribution of begging characters in CSS rules. I have never even giving it a second thought before.

  5. Altaf says:

    Surprise to see amazing analysis and overall got a laugh on article.Thanks for Posting!

Leave a Reply

Comment Rules: Please use a real name or alias. Keywords are not allowed in the "name" field and deep URLs are not allowed in the "Website" field. If you use keywords or deep URLs, your comment or URL will be removed. No foul language, please. Thank you for cooperating.

Markdown in use! Use `backticks` for inline code snippets and triple backticks at start and end for code blocks. You can also indent a code block four spaces. And no need to escape HTML, just type it correctly but make sure it's inside code delimeters (backticks or triple backticks).