Skip to content
Browse files

Updates to the css style of rendered html text cells.

  • Loading branch information...
1 parent 8bee5f8 commit db81ec2f4a23860eb209ef2fa2970f82388f7ddd @ellisonbg ellisonbg committed Aug 9, 2011
View
4 IPython/frontend/html/notebook/static/css/notebook.css
@@ -199,7 +199,7 @@ div.output_stream {
div.output_latex {
/* Slightly bigger than the rest of the notebook */
- font-size: 116%;
+ font-size: 100%;
}
div.output_html {
@@ -219,7 +219,7 @@ div.text_cell_input {
div.text_cell_render {
font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
/* Slightly bigger than the rest of the notebook */
- font-size: 116%;
+ font-size: 100%;
outline: none;
resize: none;
width: inherit;
View
65 IPython/frontend/html/notebook/static/css/renderedhtml.css
@@ -4,17 +4,56 @@
.rendered_html u {text-decoration: underline;}
.rendered_html :link { text-decoration: underline }
.rendered_html :visited { text-decoration: underline }
-.rendered_html h1 {font-size: 197%; margin: .67em 0; font-weight: bold;}
+.rendered_html h1 {font-size: 197%; margin: .65em 0; font-weight: bold;}
.rendered_html h2 {font-size: 153.9%; margin: .75em 0; font-weight: bold;}
-.rendered_html h3 {font-size: 116%; margin: .83em 0; font-weight: bold;}
-.rendered_html h4 {margin: 1.12em 0; font-weight: bold;}
-.rendered_html h5 {font-size: 85%.; margin: 1.5em 0; font-weight: bold;}
-.rendered_html h6 {font-size: 77%; margin: 1.67em 0; font-weight: bold;}
-.rendered_html ul {list-style:disc; margin-left: 40px;}
-.rendered_html ul ul {list-style:square; margin-left: 40px;}
-.rendered_html ul ul ul {list-style:circle; margin-left: 40px;}
-.rendered_html ol {list-style:upper-roman; margin-left: 40px;}
-.rendered_html ol ol {list-style:upper-alpha;}
-.rendered_html ol ol ol {list-style:decimal;}
-.rendered_html ol ol ol ol {list-style:lower-alpha;}
-.rendered_html ol ol ol ol ol {list-style:lower-roman;}
+.rendered_html h3 {font-size: 123.1%; margin: .85em 0; font-weight: bold;}
+.rendered_html h4 {font-size: 100% margin: 0.95em 0; font-weight: bold;}
+.rendered_html h5 {font-size: 85%; margin: 1.5em 0; font-weight: bold;}
+.rendered_html h6 {font-size: 77%; margin: 1.65em 0; font-weight: bold;}
+.rendered_html ul {list-style:disc; margin: 1em 2em;}
+.rendered_html ul ul {list-style:square; margin: 0em 2em;}
+.rendered_html ul ul ul {list-style:circle; margin-left: 0em 2em;}
+.rendered_html ol {list-style:upper-roman; margin: 1em 2em;}
+.rendered_html ol ol {list-style:upper-alpha; margin: 0em 2em;}
+.rendered_html ol ol ol {list-style:decimal; margin: 0em 2em;}
+.rendered_html ol ol ol ol {list-style:lower-alpha; margin 0em 2em;}
+.rendered_html ol ol ol ol ol {list-style:lower-roman; 0em 2em;}
+
+.rendered_html hr {
+ color: black;
+ background-color: black;
+}
+
+.rendered_html pre {
+ margin: 1em 2em;
+}
+
+.rendered_html blockquote {
+ margin: 1em 2em;
+}
+
+.rendered_html table {
+ border: 1px solid black;
+ border-collapse: collapse;
+ margin: 1em 2em;
+}
+
+.rendered_html td {
+ border: 1px solid black;
+ text-align: left;
+ vertical-align: middle;
+ padding: 4px;
+}
+
+.rendered_html th {
+ border: 1px solid black;
+ text-align: left;
+ vertical-align: middle;
+ padding: 4px;
+ font-weight: bold;
+}
+
+.rendered_html tr {
+ border: 1px solid black;
+}
+
View
202 docs/examples/notebooks/formatting.ipynb
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="utf-8"?>
+<notebook>
+ <name>formatting</name>
+ <id>3eaf4ff7-e2c8-46f2-acd3-be16df73aee6</id>
+ <nbformat>2</nbformat>
+ <worksheets>
+ <worksheet>
+ <cells>
+ <markdowncell>
+ <source># Title (h1)
+
+## Heading (h2)
+
+### Heading (h3)
+
+Here is a paragraph of text.
+
+* One.
+ - Sublist
+ - Here we go
+ - Sublist
+ - Here we go
+ - Here we go
+* Two.
+ - Sublist
+* Three.
+ - Sublist
+
+Now another list:
+
+---
+
+1. Here we go
+ 1. Sublist
+ 2. Sublist
+2. There we go
+3. Now this
+
+And another paragraph.
+
+### Heading (h3)
+
+#### Heading (h4)
+
+##### Heading (h5)
+
+###### Heading (h6)
+
+## Heading (h2)
+
+</source>
+ <rendered>&lt;h1&gt;Title (h1)&lt;/h1&gt;
+
+&lt;h2&gt;Heading (h2)&lt;/h2&gt;
+
+&lt;h3&gt;Heading (h3)&lt;/h3&gt;
+
+&lt;p&gt;Here is a paragraph of text.&lt;/p&gt;
+
+&lt;ul&gt;
+&lt;li&gt;One.
+&lt;ul&gt;&lt;li&gt;Sublist
+&lt;ul&gt;&lt;li&gt;Here we go&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
+&lt;li&gt;Sublist
+&lt;ul&gt;&lt;li&gt;Here we go&lt;/li&gt;
+&lt;li&gt;Here we go&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
+&lt;li&gt;Two.
+&lt;ul&gt;&lt;li&gt;Sublist&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
+&lt;li&gt;Three.
+&lt;ul&gt;&lt;li&gt;Sublist&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
+&lt;/ul&gt;
+
+&lt;p&gt;Now another list:&lt;/p&gt;
+
+&lt;hr&gt;
+
+&lt;ol&gt;
+&lt;li&gt;Here we go
+&lt;ol&gt;&lt;li&gt;Sublist&lt;/li&gt;
+&lt;li&gt;Sublist&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;
+&lt;li&gt;There we go&lt;/li&gt;
+&lt;li&gt;Now this&lt;/li&gt;
+&lt;/ol&gt;
+
+&lt;p&gt;And another paragraph.&lt;/p&gt;
+
+&lt;h3&gt;Heading (h3)&lt;/h3&gt;
+
+&lt;h4&gt;Heading (h4)&lt;/h4&gt;
+
+&lt;h5&gt;Heading (h5)&lt;/h5&gt;
+
+&lt;h6&gt;Heading (h6)&lt;/h6&gt;
+
+&lt;h2&gt;Heading (h2)&lt;/h2&gt;</rendered>
+ </markdowncell>
+ <markdowncell>
+ <source># Heading (h1)
+
+## Heading (h2)
+
+### Heading (h3)
+
+#### Heading (h4)
+
+##### Heading (h5)
+
+###### Heading (h6)
+
+Now for a simpel code example:
+
+ for i in range(10):
+ print i
+
+Now more text</source>
+ <rendered>&lt;h1&gt;Heading (h1)&lt;/h1&gt;
+
+&lt;h2&gt;Heading (h2)&lt;/h2&gt;
+
+&lt;h3&gt;Heading (h3)&lt;/h3&gt;
+
+&lt;h4&gt;Heading (h4)&lt;/h4&gt;
+
+&lt;h5&gt;Heading (h5)&lt;/h5&gt;
+
+&lt;h6&gt;Heading (h6)&lt;/h6&gt;
+
+&lt;p&gt;Now for a simpel code example:&lt;/p&gt;
+
+&lt;pre&gt;&lt;code&gt;for i in range(10):
+ print i
+&lt;/code&gt;&lt;/pre&gt;
+
+&lt;p&gt;Now more text&lt;/p&gt;</rendered>
+ </markdowncell>
+ <markdowncell>
+ <source>## Heading (h2)
+
+Here is text.
+
+&gt; This is a *block* quote. This is a block quote. This is a block quote.
+&gt; This is a **block** quote. This is a block quote. This is a block quote.
+&gt; This is a `block` quote. This is a block quote. This is a block quote.
+&gt; This is a block quote. This is a block quote. This is a block quote.
+&gt; This is a block quote. This is a block quote. This is a block quote.
+&gt; This is a block quote. This is a block quote. This is a block quote.
+
+Here is text
+
+&lt;table&gt;
+&lt;tr&gt;
+&lt;th&gt;Header 1&lt;/th&gt;
+&lt;th&gt;Header 2&lt;/th&gt;
+&lt;/tr&gt;
+&lt;tr&gt;
+&lt;td&gt;row 1, cell 1&lt;/td&gt;
+&lt;td&gt;row 1, cell 2&lt;/td&gt;
+&lt;/tr&gt;
+&lt;tr&gt;
+&lt;td&gt;row 2, cell 1&lt;/td&gt;
+&lt;td&gt;row 2, cell 2&lt;/td&gt;
+&lt;/tr&gt;
+&lt;/table&gt;</source>
+ <rendered>&lt;h2&gt;Heading (h2)&lt;/h2&gt;
+
+&lt;p&gt;Here is text.&lt;/p&gt;
+
+&lt;blockquote&gt;
+ &lt;p&gt;This is a &lt;em&gt;block&lt;/em&gt; quote. This is a block quote. This is a block quote. &lt;br&gt;
+ This is a &lt;strong&gt;block&lt;/strong&gt; quote. This is a block quote. This is a block quote. &lt;br&gt;
+ This is a &lt;code&gt;block&lt;/code&gt; quote. This is a block quote. This is a block quote. &lt;br&gt;
+ This is a block quote. This is a block quote. This is a block quote. &lt;br&gt;
+ This is a block quote. This is a block quote. This is a block quote. &lt;br&gt;
+ This is a block quote. This is a block quote. This is a block quote. &lt;/p&gt;
+&lt;/blockquote&gt;
+
+&lt;p&gt;Here is text&lt;/p&gt;
+
+&lt;table&gt;
+&lt;tbody&gt;&lt;tr&gt;
+&lt;th&gt;Header 1&lt;/th&gt;
+&lt;th&gt;Header 2&lt;/th&gt;
+&lt;/tr&gt;
+&lt;tr&gt;
+&lt;td&gt;row 1, cell 1&lt;/td&gt;
+&lt;td&gt;row 1, cell 2&lt;/td&gt;
+&lt;/tr&gt;
+&lt;tr&gt;
+&lt;td&gt;row 2, cell 1&lt;/td&gt;
+&lt;td&gt;row 2, cell 2&lt;/td&gt;
+&lt;/tr&gt;
+&lt;/tbody&gt;&lt;/table&gt;</rendered>
+ </markdowncell>
+ <codecell>
+ <input />
+ <language>python</language>
+ <outputs />
+ </codecell>
+ </cells>
+ </worksheet>
+ </worksheets>
+</notebook>

0 comments on commit db81ec2

Please sign in to comment.
Something went wrong with that request. Please try again.