gray or grey, and center or centre?

I previously wrote about how to change gray to grey in Tailwind CSS.

So, instead of writing bg-gray-200, I could write bg-grey-200.

This would be the correct spelling, as I live in the UK.

But I recently realised that I don't change text-center or items-center when 'centre' would also be the correct spelling.

So, what value is there to renaming gray?

It adds inconsistency as it mixes US and UK English in this project and inconsistencies between different projects.

It doesn't match the CSS colour name.

And, if I'm working with others on a project, they also need to be aware of this as it's different from the default configuration and could cause some confusion and affect productivity.

Keeping it the default value would make it easier to work on, collaborate on and maintain.

Maybe, I'll leave it as gray in the future.

- Oliver

Was this interesting?

Sign up here and get more like this delivered straight to your inbox every day.

About me

Picture of Oliver

I'm an Acquia-certified Drupal Triple Expert with 17 years of experience, an open-source software maintainer and Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.