Code
Styled Code
In order to show syntax-highlighted code, you will need to apply a language specific class to the code tag. For example, .language-ruby
.
There are several languages already available (and others available from the Prismjs.com website), including:
- Markup
- CSS
- C-like
- JavaScript
- Java
- PHP
- CoffeeScript
- Sass
- Bash
- Python
- HTTP
- Ruby
- Go
<pre><code class="language-ruby">class Foo
def bar
puts 'hi'
end
end</code></pre>
Imports
Import CSS:
import 'pivotal-ui/css/code';