What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

This question already has an answer here:

I just discovered a strange behavior of the CSS syntax highlighting feature which you can see in the following code example:

.first_rule {
   color: red;
}
.second_rule:hover {
   color: blue;
}

.first_rule will have a plain black color, but .second_rule will be highlighted in blue because it is interpreted a keyword. It seems as if .first_rule would also become a keyword, as soon as I append a pseudo class (or anything else beginning with a colon) to it. This lets the user assume that there is a difference between the two kinds of identifiers, but indeed there isn't.

Is this worth the effort to fix it, in order to keep StackOverflow the most user friendy page on the web? :-)

PS: Sorry, StackOverflow Meta uses a very low contrast for syntax highlighting. Please use Firebug, if you can't see this properly or temporarily paste it to the real StackOverflow.

share|improve this question

marked as duplicate by ben is uǝq backwards, Rory, animuson, Lucifer, Hugo Dozois Jun 16 '13 at 4:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

6  
That's because second_rule is a moderator. –  Yannis May 16 '12 at 22:38
1  
SE does not make the script that highlights, it uses Google Code Prettify. Go submit a bug report if you want. –  animuson May 16 '12 at 22:54
1  
Oh, I did not know that this script was used. I quickly posted it over there too: code.google.com/p/google-code-prettify/issues/detail?id=216 Thanks. –  YMMD May 16 '12 at 23:32
    
I have noticed this for a very long time, however I never bothered to file an issue over there :) –  BoltClock's a Unicorn May 17 '12 at 2:41

1 Answer 1

up vote 2 down vote accepted

As mentioned in comments, SO depends on Prettify to do the heavy lifting here. Get a fix into that, and we'll deploy it.

share|improve this answer
    
I tried my best and I hope they'll look after this: code.google.com/p/google-code-prettify/issues/detail?id=216 Thank you. –  YMMD May 17 '12 at 15:10

Not the answer you're looking for? Browse other questions tagged .