singmotor
singmotor

Reputation: 4180

Why isn't Google Code Prettify working on css?

I'm using prettify.js for some blog posts. It's handling my html, python, and js fine, but missing the css.

My html is:

<pre>
<code class="prettyprint lang-css">`

    .my-boxclass {
        display: inline-block;
        position: relative;
        cursor: help;
        border-bottom: 1px dotted grey;
    }
</code>
</pre>

and I'm importing prettify. Here's a jsfiddle of exactly what I'm doing (and it's not syntax highlighting the jsfiddle correctly either) https://jsfiddle.net/kfdqLjm1/2/

Upvotes: 0

Views: 728

Answers (1)

Mike Samuel
Mike Samuel

Reputation: 120586

You need to load the CSS language handler. Try adding ?lang=css after run_prettify.js.

Upvotes: 2

Related Questions