fix for pre code tags

This commit is contained in:
Afzal Sayed 2017-11-30 16:36:34 +05:30
parent 62c7309296
commit 6b7c8340ee
2 changed files with 68 additions and 61 deletions

View file

@ -137,7 +137,7 @@
</div>
</div>
<div class="docs">
<pre>
<pre><code>
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;col-4 col&quot;&gt;col-4 col&lt;/div&gt;
&lt;div class=&quot;col-4 col&quot;&gt;col-4 col&lt;/div&gt;
@ -202,7 +202,7 @@
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras lorem lectus, lobortis a nibh non, luctus luctus erat posuere. Curabitur ac turpis aliquam, malesuada elit suscipit, blandit dolor.
&lt;/div&gt;
&lt;/div&gt;
</pre>
</code></pre>
</div>
</div>
<div id="typography" class="section">
@ -220,14 +220,14 @@
imperdiet sapien nec, interdum fringilla lorem. Morbi sed arcu facilisis, maximus justo vel, porttitor nisl. Nam
suscipit metus facilisis iaculis vestibulum.</p>
<div class="docs">
<pre>
<pre><code>
&lt;h1&gt;Heading 1&lt;/h1&gt;
&lt;h2&gt;Heading 2&lt;/h2&gt;
&lt;h3&gt;Heading 3&lt;/h3&gt;
&lt;h4&gt;Heading 4&lt;/h4&gt;
&lt;h5&gt;Heading 5&lt;/h5&gt;
&lt;h6&gt;Heading 6&lt;/h6&gt;
&lt;p&gt;Lorem ipsum dolor....&lt;/p&gt;</pre>
&lt;p&gt;Lorem ipsum dolor....&lt;/p&gt;</code></pre>
</div>
</div>
<div id="buttons" class="section">
@ -245,7 +245,7 @@
<button class="disabled">Disabled</button>
<button disabled>Disabled</button>
<div class="docs">
<pre>
<pre><code>
&lt;p&gt;Insprired by &lt;a href="https://codepen.io/tmrDevelops/pen/VeRvKX" target="_blank"&gt;Imprefect Buttons&lt;/a&gt;&lt;/p&gt;
&lt;button class="btn-large"&gt;Large&lt;/button&gt;
&lt;button&gt;Default&lt;/button&gt;
@ -257,7 +257,7 @@
&lt;/div&gt;
&lt;/div&gt;
&lt;button class="disabled"&gt;Disabled&lt;/button&gt;
&lt;button disabled&gt;Disabled&lt;/button&gt;</pre>
&lt;button disabled&gt;Disabled&lt;/button&gt;</code></pre>
</div>
</div>
<div id="forms" class="section">
@ -311,7 +311,7 @@
</label>
</fieldset>
<div class="docs">
<pre>
<pre><code>
&lt;div class="form-group"&gt;
&lt;label for="paperInputs1"&gt;Input&lt;/label&gt;
&lt;input type="text" placeholder="Nice input" id="paperInputs1"&gt;
@ -360,7 +360,7 @@
&lt;input type="checkbox" name="paperChecks" id="paperChecks2" value="option 2"&gt; &lt;span&gt;This is the second check&lt;/span&gt;
&lt;/label&gt;
&lt;/fieldset&gt;
</pre>
</code></pre>
</div>
</div>
<div id="lists" class="section">
@ -411,7 +411,7 @@
<li>And now we're are the top!</li>
</ul>
<div class="docs">
<pre>
<pre><code>
&lt;ol&gt;
&lt;li&gt;Do this&lt;/li&gt;
&lt;li&gt;Then this&lt;/li&gt;
@ -436,7 +436,7 @@
&lt;li&gt;But don't forget this&lt;/li&gt;
&lt;/ol&gt;
&lt;!-- Replace ol with ul for unordered lists. Go up to 5 levels deep! --&gt;</pre>
&lt;!-- Replace ol with ul for unordered lists. Go up to 5 levels deep! --&gt;</code></pre>
</div>
</div>
<div id="code" class="section">
@ -449,7 +449,7 @@ function add(x, y) {
return x + y;
} </pre>
<div class="docs">
<pre>
<pre><code>
&lt;p&gt;Let's make some pretty &lt;code&gt;&amp;lt;code&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Print files backwards using &lt;kbd&gt;tac&lt;/kbd&gt;&lt;/p&gt;
&lt;p&gt;To stop a process, hit &lt;kbd&gt;ctrl + c&lt;/kbd&gt;&lt;/p&gt;
@ -457,7 +457,7 @@ function add(x, y) {
function add(x, y) {
return x + y;
}
&lt;/pre&gt;</pre>
&lt;/pre&gt;</code></pre>
</div>
</div>
<div id="tables" class="section">
@ -556,7 +556,7 @@ function add(x, y) {
</tbody>
</table>
<div class="docs">
<pre>
<pre><code>
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
@ -590,7 +590,7 @@ function add(x, y) {
&lt;!-- Add table-hover or table-alternating to change the style of the table --&gt;
&lt;table class=&quot;table-hover&quot;&gt;
&lt;table class=&quot;table-alternating&quot;&gt;</pre>
&lt;table class=&quot;table-alternating&quot;&gt;</code></pre>
</div>
</div>
<div id="popovers" class="section">
@ -614,11 +614,11 @@ function add(x, y) {
</div>
<div class="docs">
<pre>
<pre><code>
&lt;p popover="Popover on left" popover-position="left"&gt;Popover left position&lt;/p&gt;
&lt;p popover="Popover on top" popover-position="top"&gt;Popover top position&lt;/p&gt;
&lt;p popover="Popover on bottom" popover-position="bottom"&gt;Popover bottom position&lt;/p&gt;
&lt;p popover="Popover on right" popover-position="right"&gt;Popover right position&lt;/p&gt;</pre>
&lt;p popover="Popover on right" popover-position="right"&gt;Popover right position&lt;/p&gt;</code></pre>
</div>
<p>But you can also popover on pretty much any element you want, it can be on a button, on a table cell, ...</p>
@ -630,8 +630,8 @@ function add(x, y) {
</div>
<div class="docs">
<pre>
&lt;button popover="Popover on top" popover-position="top"&gt;Popover on top and on a button!&lt;/button&gt;</pre>
<pre><code>
&lt;button popover="Popover on top" popover-position="top"&gt;Popover on top and on a button!&lt;/button&gt;</code></pre>
</div>
</div>
@ -653,7 +653,7 @@ function add(x, y) {
</div>
<div class="docs">
<pre>
<pre><code>
&lt;div class="card" style="width: 20rem;"&gt;
&lt;img src="https://picsum.photos/768" alt="Card example image"&gt;
@ -663,7 +663,7 @@ function add(x, y) {
&lt;p class="card-text"&gt;Notice that the card width in this example have been set to 20rem, otherwise it will try to fill the current container/row where the card is.&lt;/p&gt;
&lt;button&gt;Let me go here!&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
&lt;/div&gt;</code></pre>
</div>
<h4>Card title, text, links</h4>
@ -680,7 +680,7 @@ function add(x, y) {
</div>
<div class="docs">
<pre>
<pre><code>
&lt;div class="card" style="width: 20rem;"&gt;
&lt;div class="card-body"&gt;
&lt;h4 class="card-title"&gt;My awesome Paper card!&lt;/h4&gt;
@ -689,7 +689,7 @@ function add(x, y) {
&lt;a class="card-link" href="#"&gt;First link&lt;/a&gt;
&lt;a class="card-link" href="#"&gt;Second link&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
&lt;/div&gt;</code></pre>
</div>
<h4>Image on top or bottom</h4>
@ -706,7 +706,7 @@ function add(x, y) {
</div>
<div class="docs">
<pre>
<pre><code>
&lt;div class="card" style="width: 20rem;"&gt;
&lt;div class="card-body"&gt;
&lt;h4 class="card-title"&gt;My awesome Paper card!&lt;/h4&gt;
@ -715,7 +715,7 @@ function add(x, y) {
&lt;button&gt;Let me go here!&lt;/button&gt;
&lt;/div&gt;
&lt;img class="image-bottom" src="https://unsplash.it/550/250" alt="Card example image"&gt;
&lt;/div&gt;</pre>
&lt;/div&gt;</code></pre>
</div>
<h4>Header and footer</h4>
@ -733,7 +733,7 @@ function add(x, y) {
</div>
<div class="docs">
<pre>
<pre><code>
&lt;div class="card" style="width: 20rem;"&gt;
&lt;div class="card-header"&gt;Header&lt;/div&gt;
&lt;div class="card-body"&gt;
@ -744,7 +744,7 @@ function add(x, y) {
&lt;/div&gt;
&lt;div class="card-footer"&gt;Footer&lt;/div&gt;
&lt;/div&gt;
</pre>
</code></pre>
</div>
</div>
@ -761,13 +761,13 @@ function add(x, y) {
<h6>Example h6 heading <span class="badge">123</span></h6>
<div class="docs">
<pre>
<pre><code>
&lt;h1&gt;Example h1 heading &lt;span class="badge"&gt;123&lt;/span&gt;&lt;/h1&gt;
&lt;h2&gt;Example h2 heading &lt;span class="badge secondary"&gt;123&lt;/span&gt;&lt;/h2&gt;
&lt;h3&gt;Example h3 heading &lt;span class="badge success"&gt;123&lt;/span&gt;&lt;/h3&gt;
&lt;h4&gt;Example h4 heading &lt;span class="badge warning"&gt;123&lt;/span&gt;&lt;/h4&gt;
&lt;h5&gt;Example h5 heading &lt;span class="badge danger"&gt;123&lt;/span&gt;&lt;/h5&gt;
&lt;h6&gt;Example h6 heading &lt;span class="badge"&gt;123&lt;/span&gt;&lt;/h6&gt;</pre>
&lt;h6&gt;Example h6 heading &lt;span class="badge"&gt;123&lt;/span&gt;&lt;/h6&gt;</code></pre>
</div>
</div>
@ -781,13 +781,13 @@ function add(x, y) {
<p class="text-danger">Text danger</p>
<p class="text-muted">Text muted</p>
<div class="docs">
<pre>
<pre><code>
&lt;p class=&quot;text-primary&quot;&gt;Text primary&lt;/p&gt;
&lt;p class=&quot;text-secondary&quot;&gt;Text secondary&lt;/p&gt;
&lt;p class=&quot;text-success&quot;&gt;Text success&lt;/p&gt;
&lt;p class=&quot;text-warning&quot;&gt;Text warning&lt;/p&gt;
&lt;p class=&quot;text-danger&quot;&gt;Text danger&lt;/p&gt;
&lt;p class="text-muted"&gt;Text muted&lt;/p&gt; </pre>
&lt;p class="text-muted"&gt;Text muted&lt;/p&gt; </code></pre>
</div>
<h4>Backgrounds</h4>
<div class="row flex-center">
@ -798,14 +798,14 @@ function add(x, y) {
<div class="sm-2 col background-danger">Background danger</div>
</div>
<div class="docs">
<pre>
<pre><code>
&lt;div class=&quot;row flex-center&quot;&gt;
&lt;div class=&quot;sm-2 col background-primary&quot;&gt;Background primary&lt;/div&gt;
&lt;div class=&quot;sm-2 col background-secondary&quot;&gt;Background secondary&lt;/div&gt;
&lt;div class=&quot;sm-2 col background-success&quot;&gt;Background success&lt;/div&gt;
&lt;div class=&quot;sm-2 col background-warning&quot;&gt;Background warning&lt;/div&gt;
&lt;div class=&quot;sm-2 col background-danger&quot;&gt;Background danger&lt;/div&gt;
&lt;/div&gt;</pre>
&lt;/div&gt;</code></pre>
</div>
</div>
<div id="borders" class="section">
@ -822,7 +822,7 @@ function add(x, y) {
<div class="sm-3 col border border-6 border-primary">Border-6</div>
</div>
<div class="docs">
<pre>
<pre><code>
&lt;div class="row flex-spaces"&gt;
&lt;div class="sm-3 col border border-primary"&gt;Default Border&lt;/div&gt;
&lt;div class="sm-3 col border border-2 border-primary"&gt;Border-2&lt;/div&gt;
@ -832,7 +832,7 @@ function add(x, y) {
&lt;div class="sm-3 col border border-4 border-primary"&gt;Border-4&lt;/div&gt;
&lt;div class="sm-3 col border border-5 border-primary"&gt;Border-5&lt;/div&gt;
&lt;div class="sm-3 col border border-6 border-primary"&gt;Border-6&lt;/div&gt;
&lt;/div&gt;</pre>
&lt;/div&gt;</code></pre>
</div>
<h4>Border Colors</h4>
<div class="row child-borders">
@ -844,7 +844,7 @@ function add(x, y) {
<div class="sm-2 col border background-primary border-white">Border white</div>
</div>
<div class="docs">
<pre>
<pre><code>
&lt;div class="row child-borders"&gt;
&lt;div class="sm-2 col border border-primary"&gt;Border primary&lt;/div&gt;
&lt;div class="sm-2 col border border-secondary"&gt;Border secondary&lt;/div&gt;
@ -860,7 +860,7 @@ function add(x, y) {
&lt;div class="sm-2 col border border-warning"&gt;Border warning&lt;/div&gt;
&lt;div class="sm-2 col border border-danger"&gt;Border danger&lt;/div&gt;
&lt;div class="sm-2 col border background-primary border-white"&gt;Border white&lt;/div&gt;
&lt;/div&gt;</pre>
&lt;/div&gt;</code></pre>
</div>
<h4>Child Borders</h4>
<p>Use this if you want all children to have a border. This will alternate through the different border styles defined above instead of having to add the border class for each element.</p>
@ -873,7 +873,7 @@ function add(x, y) {
<div class="sm-2 col">6</div>
</div>
<div class="docs">
<pre>
<pre><code>
&lt;div class="row flex-center child-borders"&gt;
&lt;div class="sm-2 col"&gt;1&lt;/div&gt;
&lt;div class="sm-2 col"&gt;2&lt;/div&gt;
@ -881,7 +881,7 @@ function add(x, y) {
&lt;div class="sm-2 col"&gt;4&lt;/div&gt;
&lt;div class="sm-2 col"&gt;5&lt;/div&gt;
&lt;div class="sm-2 col"&gt;6&lt;/div&gt;
&lt;/div&gt;</pre>
&lt;/div&gt;</code></pre>
</div>
<h4>Border Styles</h4>
<div class="row flex-spaces child-borders">
@ -891,13 +891,13 @@ function add(x, y) {
<div class="sm-3 col border-dotted border-thick">Dotted Thick</div>
</div>
<div class="docs">
<pre>
<pre><code>
&lt;div class="row flex-spaces child-borders"&gt;
&lt;div class="sm-3 col border-dashed"&gt;Dashed&lt;/div&gt;
&lt;div class="sm-3 col border-dotted"&gt;Dotted&lt;/div&gt;
&lt;div class="sm-3 col border-dashed border-thick"&gt;Dashed Thick&lt;/div&gt;
&lt;div class="sm-3 col border-dotted border-thick"&gt;Dotted Thick&lt;/div&gt;
&lt;/div&gt;</pre>
&lt;/div&gt;</code></pre>
</div>
<h4>Shadows</h4>
<div class="row flex-spaces child-borders">
@ -907,13 +907,13 @@ function add(x, y) {
<div class="sm-3 col shadow shadow-hover">Hover</div>
</div>
<div class="docs">
<pre>
<pre><code>
&lt;div class="row flex-spaces child-borders"&gt;
&lt;div class="sm-3 col shadow shadow-large"&gt;Large&lt;/div&gt;
&lt;div class="sm-3 col shadow"&gt;Default&lt;/div&gt;
&lt;div class="sm-3 col shadow shadow-small"&gt;Small&lt;/div&gt;
&lt;div class="sm-3 col shadow shadow-hover"&gt;Hover&lt;/div&gt;
&lt;/div&gt;</pre>
&lt;/div&gt;</code></pre>
</div>
<h4>Child Shadows</h4>
<p>Use this if you want all children to have a shadow.</p>
@ -923,12 +923,12 @@ function add(x, y) {
<div class="sm-3 col">Shadow</div>
</div>
<div class="docs">
<pre>
<pre><code>
&lt;div class="row flex-spaces child-borders child-shadows"&gt;
&lt;div class="sm-3 col"&gt;Shadow&lt;/div&gt;
&lt;div class="sm-3 col"&gt;Shadow&lt;/div&gt;
&lt;div class="sm-3 col"&gt;Shadow&lt;/div&gt;
&lt;/div&gt;</pre>
&lt;/div&gt;</code></pre>
</div>
<h4>Child Shadows Hover</h4>
<p>Use this if you want all children to have a shadow... that changes on hover</p>
@ -938,12 +938,12 @@ function add(x, y) {
<div class="sm-3 col">Shadow</div>
</div>
<div class="docs">
<pre>
<pre><code>
&lt;div class="row flex-spaces child-borders child-shadows-hover"&gt;
&lt;div class="sm-3 col"&gt;Shadow&lt;/div&gt;
&lt;div class="sm-3 col"&gt;Shadow&lt;/div&gt;
&lt;div class="sm-3 col"&gt;Shadow&lt;/div&gt;
&lt;/div&gt;</pre>
&lt;/div&gt;</code></pre>
</div>
</div>
<div id="utilities" class="section">
@ -955,12 +955,12 @@ function add(x, y) {
<div class="sm-3 col margin-top-small">Margin-top-small</div>
</div>
<div class="docs">
<pre>
<pre><code>
&lt;div class="row flex-spaces child-borders"&gt;
&lt;div class="sm-3 col margin"&gt;Margin&lt;/div&gt;
&lt;div class="sm-3 col margin-large"&gt;Margin-large&lt;/div&gt;
&lt;div class="sm-3 col margin-top-small"&gt;Margin-top-small&lt;/div&gt;
&lt;/div&gt;</pre>
&lt;/div&gt;</code></pre>
</div>
<h4>Padding</h4>
<div class="row flex-spaces child-borders">
@ -969,12 +969,12 @@ function add(x, y) {
<div class="sm-3 col padding-left-large">Padding-left-large</div>
</div>
<div class="docs">
<pre>
<pre><code>
&lt;div class="row flex-spaces child-borders"&gt;
&lt;div class="sm-3 col padding-small"&gt;Padding-small&lt;/div&gt;
&lt;div class="sm-3 col padding-none"&gt;Padding-none&lt;/div&gt;
&lt;div class="sm-3 col padding-left-large"&gt;Padding-left-large&lt;/div&gt;
&lt;/div&gt;</pre>
&lt;/div&gt;</code></pre>
</div>
</div>
<div id="images" class="section">
@ -983,8 +983,8 @@ function add(x, y) {
<p>Images by default are responsive</p>
<img src="https://unsplash.it/900" alt="Random Unsplash">
<div class="docs">
<pre>
&lt;img src="https://unsplash.it/900" alt="Random Unsplash"&gt;</pre>
<pre><code>
&lt;img src="https://unsplash.it/900" alt="Random Unsplash"&gt;</code></pre>
</div>
<h4>Float</h4>
<p>You can also float responsive images to fit neatly with your text</p>
@ -996,20 +996,20 @@ function add(x, y) {
Aenean mauris tellus, facilisis sed quam non, tincidunt rutrum risus. Fusce quam urna, commodo vitae nunc condimentum, efficitur commodo libero. Sed dignissim odio enim, ac pharetra dui laoreet id. Suspendisse nec accumsan erat. Integer sit amet leo arcu. Proin sagittis blandit tempor. Vivamus at egestas lectus. Mauris eros tellus, egestas ac neque eget, lacinia sagittis ante. Phasellus faucibus suscipit erat, eget malesuada neque congue non.
</p>
<div class="docs">
<pre>
<pre><code>
&lt;p&gt;
&lt;img src="https://unsplash.it/200" class="float-left"&gt;
Lorem ipsum dolor.......
&lt;img src="https://unsplash.it/100" class="float-right"&gt;
Aenean mauris tellus......
&lt;/p&gt;</pre>
&lt;/p&gt;</code></pre>
</div>
<h4>No Responsive &amp; No Borders</h4>
<p>If you don't like the default, you can just add the class <code>no-responsive</code> to prevent the image from being responsive. You can also remove the default border with <code>no-border</code>.</p>
<img src="https://unsplash.it/300" alt="Not responsive Unsplash" class="no-responsive no-border">
<div class="docs">
<pre>
&lt;img src="https://unsplash.it/300" class="no-responsive no-border"&gt;</pre>
<pre><code>
&lt;img src="https://unsplash.it/300" class="no-responsive no-border"&gt;</code></pre>
</div>
</div>
<div id="alerts" class="section">
@ -1032,14 +1032,14 @@ function add(x, y) {
</div>
</div>
<div class="docs">
<pre>
<pre><code>
&lt;div class="row flex-spaces"&gt;
&lt;div class="alert alert-primary"&gt;Alert-primary&lt;/div&gt;
&lt;div class="alert alert-secondary"&gt;Alert-secondary&lt;/div&gt;
&lt;div class="alert alert-success"&gt;Alert-success&lt;/div&gt;
&lt;div class="alert alert-warning"&gt;Alert-warning&lt;/div&gt;
&lt;div class="alert alert-danger"&gt;Alert-danger&lt;/div&gt;
&lt;/div&gt;</pre>
&lt;/div&gt;</code></pre>
</div>
</div>
<div class="section">
@ -1065,8 +1065,7 @@ function add(x, y) {
</ul>
<p>Here's a quck snippet to get started with PaperCSS:</p>
<div class="docs">
<pre>
&lt;!DOCTYPE html&gt;
<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
&lt;meta charset=&quot;UTF-8&quot;&gt;
@ -1081,7 +1080,7 @@ function add(x, y) {
&lt;p&gt;This is where some content would go.&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
&lt;/html&gt;</code></pre>
</div>
<h4>Build it Yourself</h4>
<p>If you'd rather customize things, you can build the CSS yourself via the git repo</p>

View file

@ -25,4 +25,12 @@ pre {
border-radius: 3px;
overflow-x: auto;
white-space: pre-wrap;
}
pre code{
color: inherit;
background: transparent;
white-space: pre;
margin-top: -1.50em;
display: block;
font-size: inherit;
}