UNPKG

magical-css

Version:

A simple, unique, and responsive CSS framework, made with SASS.

515 lines (514 loc) 18.7 kB
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://unpkg.com/magical-css"> <link rel="stylesheet" href="../../../dist/magic.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script><link rel="icon" href="//palkerecsenyi.github.io/magic/documentation/media/icon.png" type="image/x-icon" /> <script defer src="https://use.fontawesome.com/releases/v5.0.3/js/all.js"></script> <link rel="stylesheet" href="../../prism.css"> <meta charset="UTF-8"> <title>Magic - Documentation</title> <script> function openNav(){ document.getElementById("nav-mobile").style.width = "100%"; } function closeNav(){ document.getElementById("nav-mobile").style.width = "0"; } </script> <script src="../../navbar.js"></script> </head> <body> <div id="nav-mobile" class="blue animate"> <a href="javascript:void(0)" class="close" onClick="closeNav()">&times;</a> <a href="https://palkerecsenyi.github.io/magic/">Home</a> <a href="https://palkerecsenyi.github.io/magic/start">Get Started</a> <a href="https://palkerecsenyi.github.io/magic/documentation">Documentation</a> <a href="https://github.com/palkerecsenyi/magic">Github</a> </div> <nav class="blue"> <ul class="nav-left"> <li><a href="/magic" class="nav-brand-text">Magic.CSS</a></li> <li class="nav-mobile-open" onClick="openNav()"><i class="fas fa-bars"></i></li> </ul> <ul class="nav-right"> <li class="nav-item"><a href="https://palkerecsenyi.github.io/magic/">Home</a></li> <li class="nav-item"><a href="https://palkerecsenyi.github.io/magic/start">Get Started</a></li> <li class="nav-item active"><a href="https://palkerecsenyi.github.io/magic/documentation">Documentation</a></li> <li class="nav-item"><a href="https://github.com/palkerecsenyi/magic">Github</a></li> </ul> </nav> <div class="navigation blue"> <div class="links"> <script>addNav(true,"type");</script> </div> </div> <div class="container"> <h1 class="header">Typography</h1> <p class="trailer">The quality of your typography determines a lot. Magic comes with several customisable text formats, each made to integrate well with any website.</p> <hr class="separator"> <h2>Default text styles</h2> <p>For all typography, Magic uses the '<a href="https://www.google.com/get/noto/" class="link">Noto</a>' font by Google. In some instances, the font weight is changed to achieve a more appropriate look. Both the 'Noto Regular' and 'Noto Thin' fonts are used. Magic makes default tags (e.g. <span class="i-code">h1, h2, p</span>) look like this:</p> <h1>Heading 1 (h1)</h1> <h2>Heading 2 (h2)</h2> <h3>Heading 3 (h3)</h3> <h4>Heading 4 (h4)</h4> <h5>Heading 5 (h5)</h5> <h6>Heading 6 (h6)</h6> <p>Paragraph (p)</p> <hr class="separator"> <p>These require no additional mark-up, just the normal tags as shown above.</p> <h2>Headers</h2> <p>Magic also has special headers, sub-headers, 'trailers' and separators for pages:</p> <h1 class="header">Header</h1> <h2 class="sub-header">Sub-header</h2> <p class="trailer">Trailer - Lorem ipsum dolor sit amet.</p> <hr class="separator"> <pre><code class="language-markup">&lt;h1 class="header"&gt;Header&lt;/h1&gt; &lt;h2 class="sub-header"&gt;Sub-header&lt;/h2&gt; &lt;!-- Does not have to be h2 --&gt; &lt;p class="trailer"&gt;Trailer - Lorem ipsum dolor sit amet&lt;/p&gt; &lt;hr class="separator"&gt;</code></pre> <p>These are intended to be used at the top of an informational page (e.g. documentation!) to introduce the page's content.</p> <h2>Links</h2> <p>Magic does not style <span class="i-code">&lt;a&gt;</span> tags by default. Without any class names, a link simply looks like the browser default: <a href="#">Click me!</a>. However, in most cases links look nicer with Magic styles. They make them look clearly clickable, and make the stand out from text: <a href="#" class="link">Click me!</a>. To do this, simply add the <span class="i-code">link</span> class to any <span class="i-code">&lt;a&gt;</span> tag:</p> <pre><code class="language-markup">&lt;a href="#" class="link"&gt;Click me!&lt;/a&gt;</code></pre> <p>You can also make other types of links:</p> <p><a href="#!" class="link capitals">I am capitalized</a></p> <pre><code class="language-html">&lt;a href="#" class="link capitals"&gt;</code></pre> <p><a href="#!" class="link lined">I am underlined</a></p> <pre><code class="language-html">&lt;a href="#" class="link lined"&gt;</code></pre> <p><a href="#!" class="link lined capitals">I am capitalized AND underlined</a></p> <pre><code class="language-html">&lt;a href="#" class="link lined capitals"&gt;</code></pre> <h2>Secondary text</h2> <p>Magic also has faded secondary text, designed to go directly after any primary heading:</p> <h3>Primary <span class="mute">Secondary</span></h3> <pre><code class="language-markup">&lt;h3&gt;Primary &lt;span class=&quot;mute&quot;&gt;Secondary&lt;/span&gt;&lt;/h3&gt;</code></pre> <h2>Important text</h2> <p>Make a paragraph section seem more important by adding one of the following classes:</p> <p class="important-1">I am very important</p> <p class="important-2">I am very important</p> <p class="important-3">I am very important</p> <p class="important-4">I am very important</p> <pre><code class="language-markup">&lt;p class=&quot;important-1&quot;&gt;I am very important&lt;/p&gt; &lt;p class=&quot;important-2&quot;&gt;I am very important&lt;/p&gt; &lt;p class=&quot;important-3&quot;&gt;I am very important&lt;/p&gt; &lt;p class=&quot;important-4&quot;&gt;I am very important&lt;/p&gt;</code></pre> <h2>Blockquotes</h2> <p>Magic also has standard support for blockquotes:</p> <blockquote> Big fancy blockquote. </blockquote> <p>This uses the standard <span class="i-code">blockquote</span> tag, with no extra classes.</p> <pre><code class="language-markup">&lt;blockquote&gt; Big fancy blockquote. &lt;/blockquote&gt;</code></pre> <h3>Source</h3> <p>Magic also allows you to cite a source:</p> <blockquote> A very interesting quote. <cite title="Source">by Interesting Person</cite> </blockquote> <pre><code class="language-markup">&lt;blockquote&gt; A very interesting quote. &lt;cite title=&quot;Source&quot;&gt;by Interesting Person&lt;/cite&gt; &lt;/blockquote&gt;</code></pre> <h3>Centered</h3> <p>Blockquotes can be center-aligned too. You need to use the <span class="i-code">center</span> class.</p> <blockquote class="center"> Center aligned, fancy line changes. <cite title="Source">Interesting Person</cite> </blockquote> <pre><code class="language-markup">&lt;blockquote class=&quot;center&quot;&gt; Center aligned, fancy line changes. &lt;cite title=&quot;Source&quot;&gt;Interesting Person&lt;/cite&gt; &lt;/blockquote&gt;</code></pre> <h3>Right-aligned</h3> <p>They can also be right-aligned:</p> <blockquote class="right"> Right aligned. Obvious line changes. <cite title="Source">Interesting person</cite> </blockquote> <pre><code class="language-markup">&lt;blockquote class=&quot;right&quot;&gt; Right aligned. Obvious line changes. &lt;cite title=&quot;Source&quot;&gt;Interesting person&lt;/cite&gt; &lt;/blockquote&gt;</code></pre> <h2>Abbreviations</h2> <p>Magic also supports the <span class="i-code">abbr</span> tag:</p> <p><abbr title="Hypertext Markup Language">HTML</abbr></p> <p><abbr title="Navigation Bar">Navbar</abbr></p> <pre><code class="language-markup">&lt;p&gt;&lt;abbr title=&quot;Hypertext Markup Language&quot;&gt;HTML&lt;/abbr&gt;&lt;/p&gt; &lt;p&gt;&lt;abbr title=&quot;Navigation Bar&quot;&gt;Navbar&lt;/abbr&gt;&lt;/p&gt;</code></pre> <h2>Tables</h2> <p>Magic comes with tables, which can optionally be made responsive:</p> <table class="table"> <thead> <tr> <th>ID</th> <th>First name</th> <th>Last name</th> <th>Age</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>John</td> <td>Smith</td> <td>37</td> </tr> <tr> <th scope="row">2</th> <td>John</td> <td>Doe</td> <td>90</td> </tr> <tr> <th scope="row">3</th> <td>Jane</td> <td>Doe</td> <td>21</td> </tr> </tbody> </table> <pre><code class="language-markup">&lt;table class=&quot;table&quot;&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;ID&lt;/th&gt; &lt;th&gt;First name&lt;/th&gt; &lt;th&gt;Last name&lt;/th&gt; &lt;th&gt;Age&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;th scope=&quot;row&quot;&gt;1&lt;/th&gt; &lt;td&gt;John&lt;/td&gt; &lt;td&gt;Smith&lt;/td&gt; &lt;td&gt;37&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th scope=&quot;row&quot;&gt;2&lt;/th&gt; &lt;td&gt;John&lt;/td&gt; &lt;td&gt;Doe&lt;/td&gt; &lt;td&gt;90&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th scope=&quot;row&quot;&gt;3&lt;/th&gt; &lt;td&gt;Jane&lt;/td&gt; &lt;td&gt;Doe&lt;/td&gt; &lt;td&gt;21&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;</code></pre> <h3>Dark table</h3> <p>You can make the entire table darker, by adding the <span class="i-code">dark</span> class:</p> <table class="table dark"> <thead> <tr> <th>ID</th> <th>First name</th> <th>Last name</th> <th>Age</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>John</td> <td>Smith</td> <td>37</td> </tr> <tr> <th scope="row">2</th> <td>John</td> <td>Doe</td> <td>90</td> </tr> <tr> <th scope="row">3</th> <td>Jane</td> <td>Doe</td> <td>21</td> </tr> </tbody> </table> <pre><code class="language-markup">&lt;table class=&quot;table dark&quot;&gt; ... &lt;/table&gt;</code></pre> <h5>Individual dark parts</h5> <p>You can also make individual sections of the table dark:</p> <table class="table"> <thead> <tr class="dark"> <th>ID</th> <th>First name</th> <th>Last name</th> <th>Age</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>John</td> <td>Smith</td> <td>37</td> </tr> <tr> <th scope="row">2</th> <td>John</td> <td>Doe</td> <td>90</td> </tr> <tr> <th scope="row">3</th> <td>Jane</td> <td>Doe</td> <td>21</td> </tr> </tbody> </table> <table class="table"> <thead> <tr> <th>ID</th> <th>First name</th> <th>Last name</th> <th>Age</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>John</td> <td>Smith</td> <td>37</td> </tr> <tr class="dark"> <th scope="row">2</th> <td>John</td> <td>Doe</td> <td>90</td> </tr> <tr> <th scope="row">3</th> <td>Jane</td> <td>Doe</td> <td>21</td> </tr> </tbody> </table> <p>You simply need to add <span class="i-code">class="dark"</span> to any section of the table. The border colors will change automatically.</p> <h3>Zebra stripes</h3> <table class="table table-zebra"> <thead> <tr> <th>ID</th> <th>First name</th> <th>Last name</th> <th>Age</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>John</td> <td>Smith</td> <td>37</td> </tr> <tr> <th scope="row">2</th> <td>John</td> <td>Doe</td> <td>90</td> </tr> <tr> <th scope="row">3</th> <td>Jane</td> <td>Doe</td> <td>21</td> </tr> </tbody> </table> <pre><code class="language-markup">&lt;table class=&quot;table table-zebra&quot;&gt; ... &lt;/table&gt;</code></pre> <table class="table dark table-zebra"> <thead> <tr> <th>ID</th> <th>First name</th> <th>Last name</th> <th>Age</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>John</td> <td>Smith</td> <td>37</td> </tr> <tr> <th scope="row">2</th> <td>John</td> <td>Doe</td> <td>90</td> </tr> <tr> <th scope="row">3</th> <td>Jane</td> <td>Doe</td> <td>21</td> </tr> </tbody> </table> <pre><code class="language-markup">&lt;table class=&quot;table dark table-zebra&quot;&gt; ... &lt;/table&gt;</code></pre> <h3>Bordered</h3> <table class="table table-bordered"> <thead> <tr> <th>ID</th> <th>First name</th> <th>Last name</th> <th>Age</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>John</td> <td>Smith</td> <td>37</td> </tr> <tr> <th scope="row">2</th> <td colspan="2">John</td> <td>90</td> </tr> <tr> <th scope="row">3</th> <td>Jane</td> <td>Doe</td> <td>21</td> </tr> </tbody> </table> <pre><code class="language-markup">&lt;table class=&quot;table table-bordered&quot;&gt; ... &lt;/table&gt;</code></pre> <table class="table dark table-bordered"> <thead> <tr> <th>ID</th> <th>First name</th> <th>Last name</th> <th>Age</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>John</td> <td>Smith</td> <td>37</td> </tr> <tr> <th scope="row">2</th> <td colspan="2">John</td> <td>90</td> </tr> <tr> <th scope="row">3</th> <td>Jane</td> <td>Doe</td> <td>21</td> </tr> </tbody> </table> <pre><code class="language-markup">&lt;table class=&quot;table table-bordered dark&quot;&gt; ... &lt;/table&gt;</code></pre> <h3>Responsive table</h3> <p>To make a table responsive, place it inside a <code class="language-markup">&lt;div class="table-responsive"&gt;</code>:</p> <div class="table-responsive"> <table class="table"> <thead> <tr> <th>Header</th> <th>Header</th> <th>Header</th> <th>Header</th> <th>Header</th> <th>Header</th> <th>Header</th> <th>Header</th> <th>Header</th> <th>Header</th> </tr> </thead> <tbody> <tr> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> </tr> <tr> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> </tr> <tr> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> <td>Cell</td> </tr> </tbody> </table> </div> </div> <footer class="blue"> <div class="body"> <div class="content"> <h1>Magic.css</h1> <p>Neat and unique CSS framework for dynamic websites</p> </div> <div class="links"> <ul> <li class="header">Pages</li> <li><a href="/magic">Home</a></li> <li><a href="#">Start</a></li> <li><a href="https://github.com/palkerecsenyi/magic/">Github</a></li> </ul> </div> </div> <div class="bottom"> <p>&copy; Magic 2018 <span class="right-float"><a onClick="$('html, body').animate({ scrollTop: 0 }, 'slow');return false;" href="#" class="link"><i class="fas fa-arrow-up"></i> Back to Top</a></span></p> </div> </footer> <script src="../../prism.js"></script> </body> </html>