This forum is now read-only. Please use our new forums at discuss.codecademy.com.

CSS: An Overview Forum

View Course » View Exercise

583 points
F8a19f1e6abef9b666c3514c542a6d5a?s=140&d=retro
Submitted by
hmpf
over 2 years ago

css: colors work without "#"

i display three several css-files, all three work in this environment and display the correct graphic account. even with version 3 it passes when clicking on submit.
anybody an idea?

version 1 following the specs

h3 {
color: #cc6666;
}

h2 {
color: #8a2be2
}

version 2 without "#" for h3
displays a yellow triangle on line 2 left with this text:
expecting (<color>|inherit) but found cc6666*
*
h3 {
color: cc6666;
}
h2 {
color: #8a2be2
}

version 3 without twice the "#"
displays a yellow triangle on line 2 left with this text:
expecting (|inherit) but found cc6666*
a yellow triangle on line 5:
rule is empty
a red circle with a white cross inside on line 6:
unexpected token '8a2be2' at line 6, col 9
h3 {
color: cc6666;
}
h2 {
color: 8a2be2
}


1 vote

permalink

Codecademy uses an IDE, which displays warnings (since your code is wrong)

the color's isn't working, the color won't actually change if you don't use a # in the output example.

the reason it passes the exercise? because it is really hard to cover all the corner cases and still allow some creativity.

2937 points
593d545c83696644420003b7_64554016
Submitted by
stetim94
over 2 years ago