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

Based on I shouldn't need to give the lang- prefix when specifying a language for a tag, however this doesn't appear to be the case for CSS.

This is the result of specifying just <!-- language: css --> on a block of code:

css no prefix

Notice how the IDs (#) are being treated as comments rather than style declarations, and there is no nice formatting on the property names.

This is the result of specifying <!-- language: lang-css --> on the same block of code:

css with prefix

I'm not 100% sure if this is a problem, but if it is: can this be fixed?

share|improve this question
You need to have the [css] tag in the question in order to use <!-- language: css -->. – Antony May 30 '13 at 21:38
@Antony this isn't the case. is the question that code block is from and that question does have the CSS tag. – James Donnelly May 30 '13 at 21:39
<!-- language: css --> works on your question here without any code related tags. – Antony May 30 '13 at 21:51
up vote 5 down vote accepted

I shouldn't need to give the lang- prefix when specifying a language for a tag

Not exactly. What the help says is that you can use the lang- prefix or can specify a tag, and the syntax highlighting language associated with this tag will be used

(emphasis mine)

The syntax highlighting association for the tag is the default highlighter, not the lang-css one.

share|improve this answer
In that case, can the highlighting association be changed to point to the lang-css one? It's not like the CSS tag isn't popular. – James Donnelly May 30 '13 at 21:52
You'll want to take a look at the discussion on What's happening to syntax highlighting for [css] questions? for why this is the current behaviour. – Tim Stone May 30 '13 at 21:54
@JamesDonnelly: There is no highlighting association for the CSS tag because posts in that tag typically also have some HTML in them, and you don't want that to be highlighted as CSS. – hammar May 30 '13 at 21:55
Hmm I see. Thanks, @TimStone. – James Donnelly May 30 '13 at 21:56

You must log in to answer this question.

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