From d448e6921e6fc39e4fe7f484da004b2196517478 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 00:23:30 -0800 Subject: rewrite the code section of the type docs --- docs/base-css.html | 80 ++++++++++++++++++++++++++---------------------------- 1 file changed, 38 insertions(+), 42 deletions(-) (limited to 'docs/base-css.html') diff --git a/docs/base-css.html b/docs/base-css.html index 167cb5e69..222b5c81d 100644 --- a/docs/base-css.html +++ b/docs/base-css.html @@ -71,6 +71,7 @@ + - - -

Code Inline and block

- - - - - - - - - - - - - - - - - - - - - -
ElementResult
<code>In a line of text like this, your wrapped code will look like this <html> element.
<pre> -
<div>
-  <h1>Heading</h1>
-  <p>Something right here…</p>
-</div>
-

Note: Be sure to keep code within <pre> tags as close to the left as possible; it will render all tabs.

-
<pre class="prettyprint"> -

Using the google-code-prettify library, your blocks of code get a slightly different visual style and automatic syntax highlighting. You can also add an additional class to add line numbers.

-
<div>
-  <h1>Heading</h1>
-  <p>Something right here…</p>
-</div>
-
<div>
-  <h1>Heading</h1>
-  <p>Something right here…</p>
-</div>
-

Download google-code-prettify and view the readme for how to use.

-
+ +
+ +
+
+

Inline

+

Wrap inline snippets of code with <code>.

+
+For example, <code>section</code> should be wrapped as inline.
+
+
+
+

Basic block

+

Use <pre> for multiple lines of code. Be sure to turn any carets into their unicode characters for proper rendering.

+
+<pre>
+  &lt;p&gt;Sample text here...&lt;/p&gt;
+</pre>
+
+

Note: Be sure to keep code within <pre> tags as close to the left as possible; it will render all tabs.

+
+
+

Google Prettify

+

Take the same <pre> element and add two optional classes for enhanced rendering.

+
+<pre class="prettyprint
+     linenums">
+  &lt;p&gt;Sample text here...&lt;/p&gt;
+</pre>
+
+

Download google-code-prettify and view the readme for how to use.

+
+
-- cgit v1.2.3