I'm wondering if we instead of using govuk-text-colour we could use govuk-text-color.
This mirrors the spelling seen elsewhere in CSS.
color: $govuk-text-color;
vs
color: $govuk-text-colour;
I'm not sure it's worth embracing the UK spelling here, we should be inclusive and take the hit ;)
It feels like something we could support as a synonym, but I'd still keep the UK spelling as the primary name.
I second @nickcolley's suggestion — it only seems right to stick with existing conventions rather than mixing the spellings. Having done some bits and bobs with some of the GOV.UK elements, it gets quite confusing to write color: and then use a colour variable.
I agree with @ed, supporting both is the least error-prone.
@nickcolley, what do you mean by "the spelling seen elsewhere in CSS"? Where exactly do we use the US spelling? In other variables? Then I would rather change those variables to the UK spelling to make everything more consistent. Or do you simply mean the CSS color property?
@selfthinker I was referring to CSS the language uses US spelling, so when you're used to writing code, it's really rare to write using UK Spelling so using GOV.UK Frontend is confusing since you have to move from US spelling to UK.
When I joined GOV.UK one of the first things I did was spend an embarrassing amount of time debugging why a variable wasn't working, because I don't write UK spelling in code.
It seems like there is common consensus to have both.
So we could have the UK Spelling as the primary way of using variables and then alias the US spelling.
I can put together an example of how this might work.
Closing this as it's opinionated, will see if anyone else runs into this.
From a user on Slack:
My only mistake which caused me some head scratching was mistyping "govuk-colour" with "govuk-color" in a mass find-replace and wondering what the heck was going on. I appreciate why we use the word "colour" but when the "govuk-colour" variable is being used to set a color property, is there any reason why govuk-color wasn't used?
Most helpful comment
It feels like something we could support as a synonym, but I'd still keep the UK spelling as the primary name.