UNPKG

magical-css

Version:

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

96 lines (94 loc) 4.82 kB
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://unpkg.com/magical-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,"error");</script> </div> </div> <div class="container"> <h1 class="header">Errors</h1> <p class="trailer">Errors in Magic aren't really errors. They are the equivalent of what other frameworks call 'alerts' or 'notifications'.</p> <hr class="separator"> <h2>Introduction</h2> <p>Alerts/errors/notifications are a simple and straight-forward way of conveying the status of a request. For example, they can be used to tell the user that his/her login details were incorrect, or that their transaction has been successfully processed.</p> <p>In Magic, an error looks like this:</p> <div class="error problem">I am a 'problem' error!</div> <h2>Adding errors</h2> <p>To add a simple error in Magic:</p> <div class="error">Unfinished error</div> <pre class="top"><code class="language-markup">&lt;div class="error"&gt;Unfinished error&lt;/div&gt;</code></pre> <p>This error is incomplete, as it has no colour property. To complete it, we need to add colour.</p> <h3>Adding colours</h3> <p>Magic errors have their own three colours, specifically designed to match them:</p> <div class="error problem">Problem error</div> <div class="error success">Success error</div> <div class="error info">Info error</div> <pre class="top"><code class="language-markup">&lt;div class="error problem"&gt;Problem error&lt;/div&gt; &lt;div class="error success"&gt;Success error&lt;/div&gt; &lt;div class="error info"&gt;Info error&lt;/div&gt;</code></pre> <p>Despite this, you can style errors by adding a Magic Colour class (including gradients):</p> <div class="error blue-darken-1">Blue Darken-1</div> <div class="error gradient-green">Gradient Green</div> <pre class="top"><code class="language-markup">&lt;div class="error blue-darken-1"&gt;Blue Darken-1&lt;/div&gt; &lt;div class="error gradient-green"&gt;Gradient Green&lt;/div&gt;</code></pre> </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>