Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Wasn't sure why this suggested edit was necessary. The only tag is so I thought this should be picked up by our algos.

Tagging as bug but it may be a feature request.

share|improve this question
up vote 6 down vote accepted

The problem with is twofold:

  1. It corresponds to the default language hint because it's often used with other tags such as and . The default hint is used to allow prettify to highlight code blocks automatically, preventing clashes between different languages in the same post.

  2. In answer to the question title: prettify does not auto-detect CSS code blocks correctly, and so never automatically highlights CSS code blocks as such. It highlights using the parsing rules set out by the default hint, which is not compatible with CSS.

Since prettify cannot reliably automatically highlight CSS snippets, we have to tell it explicitly to do so. When you see edits adding lang-css hints appropriately, feel free to approve them. Otherwise, sadly, this can't be easily remedied because of point 1.

We could change it so that corresponds to lang-css, but that would break questions containing snippets in other languages such as and which also use default hints, for the reason stated in point 1.

This issue is further explored here: What's happening to syntax highlighting for [css] questions?

share|improve this answer

You must log in to answer this question.

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