DEV Community

Oliver Davies
Oliver Davies

Posted on • Originally published at oliverdavies.uk on

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.

P.S. Are you still using Drupal 7 and don’t know what’s involved to upgrade to Drupal 10? Book a Drupal 7 upgrade consultation call or an upgrade roadmap.

Top comments (0)