Everytime I post CSS code on SO, I am slightly more annoyed by the incredibly incorrect syntax highlighting. So, I decided to make a post about it here. Every single other language has correct syntax highlighting, but CSS keeps getting problems.
According to this thread, (if I am understanding this correctly), code is automatically highlighted based on its tags, with that whole list being the specific tags. Now, there's also a second list there with extensions to the specific tags, in which CSS is also listed. So, based on that, I'd assume CSS should work, as long as the CSS extension is indeed added.
Based on that, I assume questions that have only the CSS tag should therefore also automatically get CSS highlighting for each of its answers. That is not the case, obviously (it's treating #
as a comment, not an ID selector), so I'm wondering why. The pastebin linked in the meta.SE post also defines the CSS tag to lang-css
.
So my question is, why do questions tagged with the css tag, even when that's the only tag on the question, not show CSS higlighting?
PS: I am tagging this as a bug, because based on what I know (and listed above), this should not be happening.