Small Test error: Basic CSS: Change the Color of Text

capitalization of the style color causes failed test: Your style declaration should end with a ; .

Causes error:

1 Like

“red” is not the same thing as “Red”.

““red” is not the same thing as “Red”.” is not the same thing as "Your style declaration should end with a ; "

You are right it is a bad test and assertion message. This PR should fix it, but it is in limbo right now.

Just to point it out. The problem is the challenge is not asking for a color property value of red, it is simply telling the user that the text color should be red. Which it will be when using Red as the property value, because the value is in fact case insensitive.

yeah, the fact that ‘Red’ is a valid input, shows properly (at least on my browser), combined with a somewhat un-associated error could lead to confusion. But like the title suggests it’s not a huge issue, I’d imagine most people would understand it.

I don’t like the flexibility of color inputs in general, apparently un-capitalized hex color codes arn’t appreciated in Safari or Edge but are ok in Chrome (maybe firefox?)

I can’t speak for browser implementations but according to the specs:

4.1.3 Characters and case

The following rules always hold:

All CSS syntax is case-insensitive within the ASCII range (i.e., [a-z] and [A-Z] are equivalent), except for parts that are not under the control of CSS. For example, the case-sensitivity of values of the HTML attributes “id” and “class”, of font names, and of URIs lies outside the scope of this specification. Note in particular that element names are case-insensitive in HTML, but case-sensitive in XML.