update for dark mode 🌙

This commit is contained in:
Jenil Gogari 2020-05-16 16:38:29 -04:00
parent df8e6c9fc0
commit 6a5a35f124
8 changed files with 1441 additions and 1041 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
node_modules node_modules
_site _site
*.lock *.lock
.jekyll-cache

1
dist/chota.css vendored
View File

@ -129,6 +129,7 @@ kbd {
border-radius: 4px; border-radius: 4px;
padding: 0.2em 0.4em; padding: 0.2em 0.4em;
background-color: var(--bg-secondary-color); background-color: var(--bg-secondary-color);
color: var(--color-error);
} }
pre { pre {
background-color: var(--bg-secondary-color); background-color: var(--bg-secondary-color);

View File

@ -1,9 +1,11 @@
body.dark { body.dark {
--bg-color: #000; --bg-color: #000;
--bg-secondary-color: #131316; --bg-secondary-color: #262626;
--font-color: #f5f5f5; --font-color: #f5f5f5;
--color-grey: #ccc; --color-grey: #bbb;
--color-darkGrey: #777; --color-darkGrey: #888;
--color-primary: #17c16f;
--color-error: #ea4f4f;
} }
body > .container { body > .container {
@ -35,7 +37,7 @@ body>footer {
} }
body.dark > footer { body.dark > footer {
background-color: #1a1a1a; background-color: #262626;
} }
section { section {
@ -67,6 +69,14 @@ hr {
font-size: 1.2rem; font-size: 1.2rem;
} }
body.dark #grid .card {
background-color: rgba(26, 159, 96, 0.4);
}
body.dark .card {
box-shadow: 0 1px 3px var(--color-darkGrey);
}
.buttons { .buttons {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -74,79 +84,220 @@ hr {
} }
.buttons > * { .buttons > * {
margin: .5rem; margin: 0.5rem;
} }
.buttons > .button + .button { .buttons > .button + .button {
margin-left: .5rem; margin-left: 0.5rem;
} }
.highlight, code { background-color: var(--bg-secondary-color); } .highlight,
.highlight .c { color: #93a1a1 } /* Comment */ code {
.highlight .err { color: #586e75 } /* Error */ background-color: var(--bg-secondary-color);
.highlight .g { color: #586e75 } /* Generic */ }
.highlight .k { color: #859900 } /* Keyword */ .highlight .c {
.highlight .l { color: #586e75 } /* Literal */ color: #93a1a1;
.highlight .n { color: #586e75 } /* Name */ } /* Comment */
.highlight .o { color: #859900 } /* Operator */ .highlight .err {
.highlight .x { color: #cb4b16 } /* Other */ color: #586e75;
.highlight .p { color: #586e75 } /* Punctuation */ } /* Error */
.highlight .cm { color: #93a1a1 } /* Comment.Multiline */ .highlight .g {
.highlight .cp { color: #859900 } /* Comment.Preproc */ color: #586e75;
.highlight .c1 { color: #93a1a1 } /* Comment.Single */ } /* Generic */
.highlight .cs { color: #859900 } /* Comment.Special */ .highlight .k {
.highlight .gd { color: #2aa198 } /* Generic.Deleted */ color: #859900;
.highlight .ge { color: #586e75; font-style: italic } /* Generic.Emph */ } /* Keyword */
.highlight .gr { color: #dc322f } /* Generic.Error */ .highlight .l {
.highlight .gh { color: #cb4b16 } /* Generic.Heading */ color: #586e75;
.highlight .gi { color: #859900 } /* Generic.Inserted */ } /* Literal */
.highlight .go { color: #586e75 } /* Generic.Output */ .highlight .n {
.highlight .gp { color: #586e75 } /* Generic.Prompt */ color: #586e75;
.highlight .gs { color: #586e75; font-weight: bold } /* Generic.Strong */ } /* Name */
.highlight .gu { color: #cb4b16 } /* Generic.Subheading */ .highlight .o {
.highlight .gt { color: #586e75 } /* Generic.Traceback */ color: #859900;
.highlight .kc { color: #cb4b16 } /* Keyword.Constant */ } /* Operator */
.highlight .kd { color: #22b3eb } /* Keyword.Declaration */ .highlight .x {
.highlight .kn { color: #859900 } /* Keyword.Namespace */ color: #cb4b16;
.highlight .kp { color: #859900 } /* Keyword.Pseudo */ } /* Other */
.highlight .kr { color: #22b3eb } /* Keyword.Reserved */ .highlight .p {
.highlight .kt { color: #dc322f } /* Keyword.Type */ color: #586e75;
.highlight .ld { color: #586e75 } /* Literal.Date */ } /* Punctuation */
.highlight .m { color: #2aa198 } /* Literal.Number */ .highlight .cm {
.highlight .s { color: #2aa198 } /* Literal.String */ color: #93a1a1;
.highlight .na { color: #586e75 } /* Name.Attribute */ } /* Comment.Multiline */
.highlight .nb { color: #B58900 } /* Name.Builtin */ .highlight .cp {
.highlight .nc { color: #22b3eb } /* Name.Class */ color: #859900;
.highlight .no { color: #cb4b16 } /* Name.Constant */ } /* Comment.Preproc */
.highlight .nd { color: #22b3eb } /* Name.Decorator */ .highlight .c1 {
.highlight .ni { color: #cb4b16 } /* Name.Entity */ color: #93a1a1;
.highlight .ne { color: #cb4b16 } /* Name.Exception */ } /* Comment.Single */
.highlight .nf { color: #22b3eb } /* Name.Function */ .highlight .cs {
.highlight .nl { color: #586e75 } /* Name.Label */ color: #859900;
.highlight .nn { color: #586e75 } /* Name.Namespace */ } /* Comment.Special */
.highlight .nx { color: #586e75 } /* Name.Other */ .highlight .gd {
.highlight .py { color: #586e75 } /* Name.Property */ color: #2aa198;
.highlight .nt { color: #22b3eb } /* Name.Tag */ } /* Generic.Deleted */
.highlight .nv { color: #22b3eb } /* Name.Variable */ .highlight .ge {
.highlight .ow { color: #859900 } /* Operator.Word */ color: #586e75;
.highlight .w { color: #586e75 } /* Text.Whitespace */ font-style: italic;
.highlight .mf { color: #2aa198 } /* Literal.Number.Float */ } /* Generic.Emph */
.highlight .mh { color: #2aa198 } /* Literal.Number.Hex */ .highlight .gr {
.highlight .mi { color: #2aa198 } /* Literal.Number.Integer */ color: #dc322f;
.highlight .mo { color: #2aa198 } /* Literal.Number.Oct */ } /* Generic.Error */
.highlight .sb { color: #93a1a1 } /* Literal.String.Backtick */ .highlight .gh {
.highlight .sc { color: #2aa198 } /* Literal.String.Char */ color: #cb4b16;
.highlight .sd { color: #586e75 } /* Literal.String.Doc */ } /* Generic.Heading */
.highlight .s2 { color: #2aa198 } /* Literal.String.Double */ .highlight .gi {
.highlight .se { color: #cb4b16 } /* Literal.String.Escape */ color: #859900;
.highlight .sh { color: #586e75 } /* Literal.String.Heredoc */ } /* Generic.Inserted */
.highlight .si { color: #2aa198 } /* Literal.String.Interpol */ .highlight .go {
.highlight .sx { color: #2aa198 } /* Literal.String.Other */ color: #586e75;
.highlight .sr { color: #dc322f } /* Literal.String.Regex */ } /* Generic.Output */
.highlight .s1 { color: #2aa198 } /* Literal.String.Single */ .highlight .gp {
.highlight .ss { color: #2aa198 } /* Literal.String.Symbol */ color: #586e75;
.highlight .bp { color: #22b3eb } /* Name.Builtin.Pseudo */ } /* Generic.Prompt */
.highlight .vc { color: #22b3eb } /* Name.Variable.Class */ .highlight .gs {
.highlight .vg { color: #22b3eb } /* Name.Variable.Global */ color: #586e75;
.highlight .vi { color: #22b3eb } /* Name.Variable.Instance */ font-weight: bold;
.highlight .il { color: #2aa198 } /* Literal.Number.Integer.Long */ } /* Generic.Strong */
.highlight .gu {
color: #cb4b16;
} /* Generic.Subheading */
.highlight .gt {
color: #586e75;
} /* Generic.Traceback */
.highlight .kc {
color: #cb4b16;
} /* Keyword.Constant */
.highlight .kd {
color: #22b3eb;
} /* Keyword.Declaration */
.highlight .kn {
color: #859900;
} /* Keyword.Namespace */
.highlight .kp {
color: #859900;
} /* Keyword.Pseudo */
.highlight .kr {
color: #22b3eb;
} /* Keyword.Reserved */
.highlight .kt {
color: #dc322f;
} /* Keyword.Type */
.highlight .ld {
color: #586e75;
} /* Literal.Date */
.highlight .m {
color: #2aa198;
} /* Literal.Number */
.highlight .s {
color: #2aa198;
} /* Literal.String */
.highlight .na {
color: #586e75;
} /* Name.Attribute */
.highlight .nb {
color: #b58900;
} /* Name.Builtin */
.highlight .nc {
color: #22b3eb;
} /* Name.Class */
.highlight .no {
color: #cb4b16;
} /* Name.Constant */
.highlight .nd {
color: #22b3eb;
} /* Name.Decorator */
.highlight .ni {
color: #cb4b16;
} /* Name.Entity */
.highlight .ne {
color: #cb4b16;
} /* Name.Exception */
.highlight .nf {
color: #22b3eb;
} /* Name.Function */
.highlight .nl {
color: #586e75;
} /* Name.Label */
.highlight .nn {
color: #586e75;
} /* Name.Namespace */
.highlight .nx {
color: #586e75;
} /* Name.Other */
.highlight .py {
color: #586e75;
} /* Name.Property */
.highlight .nt {
color: #22b3eb;
} /* Name.Tag */
.highlight .nv {
color: #22b3eb;
} /* Name.Variable */
.highlight .ow {
color: #859900;
} /* Operator.Word */
.highlight .w {
color: #586e75;
} /* Text.Whitespace */
.highlight .mf {
color: #2aa198;
} /* Literal.Number.Float */
.highlight .mh {
color: #2aa198;
} /* Literal.Number.Hex */
.highlight .mi {
color: #2aa198;
} /* Literal.Number.Integer */
.highlight .mo {
color: #2aa198;
} /* Literal.Number.Oct */
.highlight .sb {
color: #93a1a1;
} /* Literal.String.Backtick */
.highlight .sc {
color: #2aa198;
} /* Literal.String.Char */
.highlight .sd {
color: #586e75;
} /* Literal.String.Doc */
.highlight .s2 {
color: #2aa198;
} /* Literal.String.Double */
.highlight .se {
color: #cb4b16;
} /* Literal.String.Escape */
.highlight .sh {
color: #586e75;
} /* Literal.String.Heredoc */
.highlight .si {
color: #2aa198;
} /* Literal.String.Interpol */
.highlight .sx {
color: #2aa198;
} /* Literal.String.Other */
.highlight .sr {
color: #dc322f;
} /* Literal.String.Regex */
.highlight .s1 {
color: #2aa198;
} /* Literal.String.Single */
.highlight .ss {
color: #2aa198;
} /* Literal.String.Symbol */
.highlight .bp {
color: #22b3eb;
} /* Name.Builtin.Pseudo */
.highlight .vc {
color: #22b3eb;
} /* Name.Variable.Class */
.highlight .vg {
color: #22b3eb;
} /* Name.Variable.Global */
.highlight .vi {
color: #22b3eb;
} /* Name.Variable.Instance */
.highlight .il {
color: #2aa198;
} /* Literal.Number.Integer.Long */

View File

@ -8,9 +8,9 @@
<meta http-equiv="X-UA-Compatible" content="IE=Edge"> <meta http-equiv="X-UA-Compatible" content="IE=Edge">
<title>chota - A micro CSS framework</title> <title>chota - A micro CSS framework</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/chota"> <!-- <link rel="stylesheet" href="https://unpkg.com/chota"> -->
<!-- for dev --> <!-- for dev -->
<!-- <link rel="stylesheet" href="./dist/chota.css"> --> <link rel="stylesheet" href="http://localhost:5000/dist/chota.css">
<link rel="stylesheet" href="./doc-styles.css"> <link rel="stylesheet" href="./doc-styles.css">
<link rel="icon" type="image/png" href="favicon.png" /> <link rel="icon" type="image/png" href="favicon.png" />
</head> </head>
@ -28,7 +28,7 @@
<a href="#start">start</a> <a href="#start">start</a>
<a href="#docs">docs</a> <a href="#docs">docs</a>
<a href="https://github.com/jenil/chota">GitHub</a> <a href="https://github.com/jenil/chota">GitHub</a>
<a href="javascript:void(0)" onclick="switchMode(this)">☀️</a> <a href="javascript:void(0)" id="theme-switch" onclick="switchMode(this)">☀️</a>
</nav> </nav>
</div> </div>
@ -113,7 +113,7 @@
/* Other styles..... */ /* Other styles..... */
{% endhighlight %} {% endhighlight %}
<br> <br>
<p>Addtionally, you can add dark mode to you site, to support devices that prefer dark mode.</p> <p>Addtionally, you can add dark mode to your site, to support devices that prefer dark mode.</p>
{% highlight html %} {% highlight html %}
<style> <style>
body.dark { body.dark {
@ -176,7 +176,22 @@
<p>Want icons for your project too? Checkout <a href="https://icongr.am" target="_blank">Icongr.am 🚀</a></p> <p>Want icons for your project too? Checkout <a href="https://icongr.am" target="_blank">Icongr.am 🚀</a></p>
<h5>Made by <a href="https://jgog.in" target="_blank">Jenil Gogari</a></h5> <h5>Made by <a href="https://jgog.in" target="_blank">Jenil Gogari</a></h5>
</footer> </footer>
<script src="./main.js"></script> <script>
if (
window.matchMedia &&
window.matchMedia("(prefers-color-scheme: dark)").matches
) {
document.body.classList.add("dark");
document.querySelector('#theme-switch').innerHTML = "🌙"
}
function switchMode(el) {
const bodyClass = document.body.classList;
bodyClass.contains("dark")
? ((el.innerHTML = "☀️"), bodyClass.remove("dark"))
: ((el.innerHTML = "🌙"), bodyClass.add("dark"));
}
</script>
<script> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

View File

@ -150,6 +150,7 @@ kbd {
border-radius: 4px; border-radius: 4px;
padding: 0.2em 0.4em; padding: 0.2em 0.4em;
background-color: var(--bg-secondary-color); background-color: var(--bg-secondary-color);
color: var(--color-error);
} }
pre { pre {

View File

@ -1,11 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Components</title> <title>Components</title>
<link rel="stylesheet" href="../dist/chota.css"> <link rel="stylesheet" href="../dist/chota.css" />
<style> <style>
.nav { .nav {
border: 1px solid red; border: 1px solid red;
@ -44,9 +43,9 @@
</div> </div>
</div> </div>
</nav> </nav>
<br> <br />
<hr> <hr />
<br> <br />
<nav class="nav"> <nav class="nav">
<div class="nav-left"> <div class="nav-left">
<a class="brand" href="#">Logo</a> <a class="brand" href="#">Logo</a>
@ -62,9 +61,9 @@
</nav> </nav>
<div class="container"> <div class="container">
<section> <section>
<br> <br />
<hr> <hr />
<br> <br />
<nav class="nav"> <nav class="nav">
<div class="nav-center"> <div class="nav-center">
<a href="#!1.html">Link 1</a> <a href="#!1.html">Link 1</a>
@ -73,14 +72,18 @@
<a href="#!" class="button primary">Button</a> <a href="#!" class="button primary">Button</a>
</div> </div>
</nav> </nav>
<br> <br />
<hr> <hr />
<br> <br />
<nav class="nav"> <nav class="nav">
<div class="nav-left"> <div class="nav-left">
<a class="brand" href="#"> <a class="brand" href="#">
<img src="https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" alt=""> <img
Brand</a> src="https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png"
alt=""
/>
Brand</a
>
</div> </div>
<div class="nav-right"> <div class="nav-right">
<div class="tabs"> <div class="tabs">
@ -90,13 +93,16 @@
</div> </div>
</div> </div>
</nav> </nav>
<br> <br />
<hr> <hr />
<br> <br />
<nav class="nav"> <nav class="nav">
<div class="nav-left"> <div class="nav-left">
<a class="brand" href="#"> <a class="brand" href="#">
<img src="https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" alt=""> <img
src="https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png"
alt=""
/>
</a> </a>
<div class="tabs"> <div class="tabs">
<a href="#!1.html">Link 1</a> <a href="#!1.html">Link 1</a>
@ -105,9 +111,9 @@
</div> </div>
</div> </div>
</nav> </nav>
<br> <br />
<hr> <hr />
<br> <br />
</section> </section>
<section> <section>
<h1>Tabs</h1> <h1>Tabs</h1>
@ -116,9 +122,9 @@
<a href="#!2.html">Tab 2</a> <a href="#!2.html">Tab 2</a>
<a href="#!3.html">Tab 3</a> <a href="#!3.html">Tab 3</a>
</div> </div>
<br> <br />
<hr> <hr />
<br> <br />
<div class="tabs is-full"> <div class="tabs is-full">
<a class="active" href="#!1.html">Tab 1</a> <a class="active" href="#!1.html">Tab 1</a>
<a href="#!2.html">Tab 2</a> <a href="#!2.html">Tab 2</a>
@ -133,9 +139,11 @@
<header> <header>
<h4>Card title</h4> <h4>Card title</h4>
</header> </header>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et <p>
dolore Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
magna aliqua. Ut enim ad minim veniam, quis nostrud exercit.</p> eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
enim ad minim veniam, quis nostrud exercit.
</p>
<footer class="is-right"> <footer class="is-right">
<a href="#!" class="button primary">Submit</a> <a href="#!" class="button primary">Submit</a>
<a href="#!" class="button">Cancel</a> <a href="#!" class="button">Cancel</a>
@ -144,13 +152,17 @@
</div> </div>
<div class="col-6"> <div class="col-6">
<div class="card"> <div class="card">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et <p>
dolore Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
magna aliqua. Ut enim ad minim veniam, quis nostrud exercit.</p> eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
<p>Ipsa magnam consequatur itaque, mollitia non quam voluptate consequuntur dignissimos recusandae ea quas, enim ad minim veniam, quis nostrud exercit.
nobis, </p>
debitis officia iure minus et dolore, reprehenderit sapiente iste. Eligendi eveniet ut qui at, deleniti <p>
enim!</p> Ipsa magnam consequatur itaque, mollitia non quam voluptate
consequuntur dignissimos recusandae ea quas, nobis, debitis
officia iure minus et dolore, reprehenderit sapiente iste.
Eligendi eveniet ut qui at, deleniti enim!
</p>
</div> </div>
</div> </div>
</div> </div>
@ -406,27 +418,35 @@
</section> </section>
<section> <section>
<h1>Icons</h1> <h1>Icons</h1>
<button type="button" class="button primary icon">New file <button type="button" class="button primary icon">
<img src="https://icongr.am/feather/file.svg?size=16&color=ffffff" alt="icon"> New file
<img
src="https://icongr.am/feather/file.svg?size=16&color=ffffff"
alt="icon"
/>
</button> </button>
<button type="button" class="button icon">New file <button type="button" class="button icon">
<img src="https://icongr.am/feather/file.svg?size=12" alt="icon"> New file
<img src="https://icongr.am/feather/file.svg?size=12" alt="icon" />
</button> </button>
<button type="button" class="button dark icon">New file <button type="button" class="button dark icon">
<img src="https://icongr.am/feather/file.svg?size=32&color=ffffff" alt="icon"> New file
<img
src="https://icongr.am/feather/file.svg?size=32&color=ffffff"
alt="icon"
/>
</button> </button>
<button class="button icon-only"> <button class="button icon-only">
<img src="https://icongr.am/feather/search.svg?size=16"> <img src="https://icongr.am/feather/search.svg?size=16" />
</button> </button>
<button class="button icon-only"> <button class="button icon-only">
<img src="https://icongr.am/feather/search.svg"> <img src="https://icongr.am/feather/search.svg" />
</button> </button>
</section> </section>
</div> </div>
<p> <p>
<br> <br />
</p> </p>
<script src="../docs/main.js"></script> <script src="../docs/main.js"></script>
</body> </body>
</html> </html>

View File

@ -1,11 +1,10 @@
<!doctype html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Elements</title> <title>Elements</title>
<link rel="stylesheet" href="../dist/chota.css"> <link rel="stylesheet" href="../dist/chota.css" />
<style> <style>
body.dark { body.dark {
--bg-color: #000; --bg-color: #000;
@ -72,7 +71,8 @@
<main role="main"> <main role="main">
<section id="text"> <section id="text">
<header> <header>
<h1>Text</h1></header> <h1>Text</h1>
</header>
<article id="text__headings"> <article id="text__headings">
<header> <header>
<h1>Headings</h1> <h1>Headings</h1>
@ -91,10 +91,17 @@
</article> </article>
<article id="text__paragraphs"> <article id="text__paragraphs">
<header> <header>
<h1>Paragraphs</h1></header> <h1>Paragraphs</h1>
</header>
<div> <div>
<p>A paragraph (from the Greek paragraphos, “to write beside” or “written beside”) is a self-contained unit of a discourse in writing dealing with a particular point or idea. A paragraph consists of one or more sentences. Though not required <p>
by the syntax of any language, paragraphs are usually an expected part of formal writing, used to organize longer prose.</p> A paragraph (from the Greek paragraphos, “to write beside” or
“written beside”) is a self-contained unit of a discourse in
writing dealing with a particular point or idea. A paragraph
consists of one or more sentences. Though not required by the
syntax of any language, paragraphs are usually an expected part
of formal writing, used to organize longer prose.
</p>
</div> </div>
<footer> <footer>
<p><a href="#top">[Top]</a></p> <p><a href="#top">[Top]</a></p>
@ -102,11 +109,20 @@
</article> </article>
<article id="text__blockquotes"> <article id="text__blockquotes">
<header> <header>
<h1>Blockquotes</h1></header> <h1>Blockquotes</h1>
</header>
<div> <div>
<blockquote> <blockquote>
<p>A block quotation (also known as a long quotation or extract) is a quotation in a written document, that is set off from the main text as a paragraph, or block of text.</p> <p>
<p>It is typically distinguished visually using indentation and a different typeface or smaller size quotation. It may or may not include a citation, usually placed at the bottom.</p> A block quotation (also known as a long quotation or extract)
is a quotation in a written document, that is set off from the
main text as a paragraph, or block of text.
</p>
<p>
It is typically distinguished visually using indentation and a
different typeface or smaller size quotation. It may or may
not include a citation, usually placed at the bottom.
</p>
<cite><a href="#!">Said no one, ever.</a></cite> <cite><a href="#!">Said no one, ever.</a></cite>
</blockquote> </blockquote>
</div> </div>
@ -116,7 +132,8 @@
</article> </article>
<article id="text__lists"> <article id="text__lists">
<header> <header>
<h1>Lists</h1></header> <h1>Lists</h1>
</header>
<div> <div>
<h3>Definition list</h3> <h3>Definition list</h3>
<dl> <dl>
@ -142,9 +159,10 @@
</article> </article>
<article id="text__hr"> <article id="text__hr">
<header> <header>
<h1>Horizontal rules</h1></header> <h1>Horizontal rules</h1>
</header>
<div> <div>
<hr> <hr />
</div> </div>
<footer> <footer>
<p><a href="#top">[Top]</a></p> <p><a href="#top">[Top]</a></p>
@ -152,9 +170,12 @@
</article> </article>
<article id="text__tables"> <article id="text__tables">
<header> <header>
<h1>Tabular data</h1></header> <h1>Tabular data</h1>
</header>
<table> <table>
<caption>Table Caption</caption> <caption>
Table Caption
</caption>
<thead> <thead>
<tr> <tr>
<th>Table Heading 1</th> <th>Table Heading 1</th>
@ -190,10 +211,15 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<br> <br />
<h4>Table with strips. Just add the <code>striped</code> class to <code>&lt;table&gt;</code>.</h4> <h4>
Table with strips. Just add the <code>striped</code> class to
<code>&lt;table&gt;</code>.
</h4>
<table class="striped"> <table class="striped">
<caption>Table Caption</caption> <caption>
Table Caption
</caption>
<thead> <thead>
<tr> <tr>
<th>Table Heading 1</th> <th>Table Heading 1</th>
@ -249,20 +275,29 @@
</article> </article>
<article id="text__code"> <article id="text__code">
<header> <header>
<h1>Code</h1></header> <h1>Code</h1>
</header>
<div> <div>
<p><strong>Keyboard input:</strong> <kbd>Cmd</kbd></p> <p><strong>Keyboard input:</strong> <kbd>Cmd</kbd></p>
<p><strong>Inline code:</strong> <code>&lt;div&gt;code&lt;/div&gt;</code></p> <p>
<p><strong>Sample output:</strong> <samp>This is sample output from a computer program.</samp></p> <strong>Inline code:</strong>
<code>&lt;div&gt;code&lt;/div&gt;</code>
</p>
<p>
<strong>Sample output:</strong>
<samp>This is sample output from a computer program.</samp>
</p>
<h2>Pre-formatted text</h2> <h2>Pre-formatted text</h2>
<pre>P R E F O R M A T T E D T E X T <pre>
P R E F O R M A T T E D T E X T
! " # $ % &amp; ' ( ) * + , - . / ! " # $ % &amp; ' ( ) * + , - . /
0 1 2 3 4 5 6 7 8 9 : ; &lt; = &gt; ? 0 1 2 3 4 5 6 7 8 9 : ; &lt; = &gt; ?
@ A B C D E F G H I J K L M N O @ A B C D E F G H I J K L M N O
P Q R S T U V W X Y Z [ \ ] ^ _ P Q R S T U V W X Y Z [ \ ] ^ _
` a b c d e f g h i j k l m n o ` a b c d e f g h i j k l m n o
p q r s t u v w x y z { | } ~ p q r s t u v w x y z { | } ~
~ 0 1 2 3 4 5 6 7 8 9 : ; &lt; = &gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ </pre> ~ 0 1 2 3 4 5 6 7 8 9 : ; &lt; = &gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ </pre
>
<pre><code>&#x3C;h2&#x3E;Pre-formatted text&#x3C;/h2&#x3E;</code></pre> <pre><code>&#x3C;h2&#x3E;Pre-formatted text&#x3C;/h2&#x3E;</code></pre>
</div> </div>
<footer> <footer>
@ -271,26 +306,57 @@
</article> </article>
<article id="text__inline"> <article id="text__inline">
<header> <header>
<h1>Inline elements</h1></header> <h1>Inline elements</h1>
</header>
<div> <div>
<p><a href="#!">This is a text link</a>.</p> <p><a href="#!">This is a text link</a>.</p>
<p><strong>Strong is used to indicate strong importance.</strong></p> <p>
<strong>Strong is used to indicate strong importance.</strong>
</p>
<p><em>This text has added emphasis.</em></p> <p><em>This text has added emphasis.</em></p>
<p>The <b>b element</b> is stylistically different text from normal text, without any special importance.</p> <p>
<p>The <i>i element</i> is text that is offset from the normal text.</p> The <b>b element</b> is stylistically different text from normal
<p>The <u>u element</u> is text with an unarticulated, though explicitly rendered, non-textual annotation.</p> text, without any special importance.
<p><del>This text is deleted</del> and <ins>This text is inserted</ins>.</p> </p>
<p>
The <i>i element</i> is text that is offset from the normal
text.
</p>
<p>
The <u>u element</u> is text with an unarticulated, though
explicitly rendered, non-textual annotation.
</p>
<p>
<del>This text is deleted</del> and
<ins>This text is inserted</ins>.
</p>
<p><s>This text has a strikethrough</s>.</p> <p><s>This text has a strikethrough</s>.</p>
<p>Superscript<sup>®</sup>.</p> <p>Superscript<sup>®</sup>.</p>
<p>Subscript for things like H<sub>2</sub>O.</p> <p>Subscript for things like H<sub>2</sub>O.</p>
<p><small>This small text is small for for fine print, etc.</small></p> <p>
<p>Abbreviation: <abbr title="HyperText Markup Language">HTML</abbr></p> <small>This small text is small for for fine print, etc.</small>
<p><q cite="https://developer.mozilla.org/en-US/docs/HTML/Element/q">This text is a short inline quotation.</q></p> </p>
<p>
Abbreviation:
<abbr title="HyperText Markup Language">HTML</abbr>
</p>
<p>
<q
cite="https://developer.mozilla.org/en-US/docs/HTML/Element/q"
>This text is a short inline quotation.</q
>
</p>
<p><cite>This is a citation.</cite></p> <p><cite>This is a citation.</cite></p>
<p>The <dfn>dfn element</dfn> indicates a definition.</p> <p>The <dfn>dfn element</dfn> indicates a definition.</p>
<p>The <mark>mark element</mark> indicates a highlight.</p> <p>The <mark>mark element</mark> indicates a highlight.</p>
<p>The <var>variable element</var>, such as <var>x</var> = <var>y</var>.</p> <p>
<p>The time element: <time datetime="2013-04-06T12:32+00:00">2 weeks ago</time></p> The <var>variable element</var>, such as <var>x</var> =
<var>y</var>.
</p>
<p>
The time element:
<time datetime="2013-04-06T12:32+00:00">2 weeks ago</time>
</p>
</div> </div>
<footer> <footer>
<p><a href="#top">[Top]</a></p> <p><a href="#top">[Top]</a></p>
@ -300,18 +366,30 @@
<section id="embedded"> <section id="embedded">
<header> <header>
<h1>Embedded content</h1></header> <h1>Embedded content</h1>
</header>
<article id="embedded__images"> <article id="embedded__images">
<header> <header>
<h2>Images</h2></header> <h2>Images</h2>
</header>
<div> <div>
<h3>No <code>&lt;figure&gt;</code> element</h3> <h3>No <code>&lt;figure&gt;</code> element</h3>
<p><img src="http://unsplash.it/480/480" alt="Image alt text"></p> <p>
<h3>Wrapped in a <code>&lt;figure&gt;</code> element, no <code>&lt;figcaption&gt;</code></h3> <img src="http://unsplash.it/480/480" alt="Image alt text" />
<figure><img src="http://unsplash.it/420/420" alt="Image alt text"></figure> </p>
<h3>Wrapped in a <code>&lt;figure&gt;</code> element, with a <code>&lt;figcaption&gt;</code></h3> <h3>
Wrapped in a <code>&lt;figure&gt;</code> element, no
<code>&lt;figcaption&gt;</code>
</h3>
<figure> <figure>
<img src="http://unsplash.it/420/420" alt="Image alt text"> <img src="http://unsplash.it/420/420" alt="Image alt text" />
</figure>
<h3>
Wrapped in a <code>&lt;figure&gt;</code> element, with a
<code>&lt;figcaption&gt;</code>
</h3>
<figure>
<img src="http://unsplash.it/420/420" alt="Image alt text" />
<figcaption>Here is a caption for this image.</figcaption> <figcaption>Here is a caption for this image.</figcaption>
</figure> </figure>
</div> </div>
@ -321,7 +399,8 @@
</article> </article>
<article id="embedded__audio"> <article id="embedded__audio">
<header> <header>
<h2>Audio</h2></header> <h2>Audio</h2>
</header>
<div><audio controls="">audio</audio></div> <div><audio controls="">audio</audio></div>
<footer> <footer>
<p><a href="#top">[Top]</a></p> <p><a href="#top">[Top]</a></p>
@ -329,7 +408,8 @@
</article> </article>
<article id="embedded__video"> <article id="embedded__video">
<header> <header>
<h2>Video</h2></header> <h2>Video</h2>
</header>
<div><video controls="">video</video></div> <div><video controls="">video</video></div>
<footer> <footer>
<p><a href="#top">[Top]</a></p> <p><a href="#top">[Top]</a></p>
@ -337,7 +417,8 @@
</article> </article>
<article id="embedded__canvas"> <article id="embedded__canvas">
<header> <header>
<h2>Canvas</h2></header> <h2>Canvas</h2>
</header>
<div><canvas>canvas</canvas></div> <div><canvas>canvas</canvas></div>
<footer> <footer>
<p><a href="#top">[Top]</a></p> <p><a href="#top">[Top]</a></p>
@ -345,7 +426,8 @@
</article> </article>
<article id="embedded__meter"> <article id="embedded__meter">
<header> <header>
<h2>Meter</h2></header> <h2>Meter</h2>
</header>
<div><meter value="2" min="0" max="10">2 out of 10</meter></div> <div><meter value="2" min="0" max="10">2 out of 10</meter></div>
<footer> <footer>
<p><a href="#top">[Top]</a></p> <p><a href="#top">[Top]</a></p>
@ -353,7 +435,8 @@
</article> </article>
<article id="embedded__progress"> <article id="embedded__progress">
<header> <header>
<h2>Progress</h2></header> <h2>Progress</h2>
</header>
<div><progress>progress</progress></div> <div><progress>progress</progress></div>
<footer> <footer>
<p><a href="#top">[Top]</a></p> <p><a href="#top">[Top]</a></p>
@ -361,15 +444,21 @@
</article> </article>
<article id="embedded__svg"> <article id="embedded__svg">
<header> <header>
<h2>Inline SVG</h2></header> <h2>Inline SVG</h2>
<div><svg width="100px" height="100px"><circle cx="100" cy="100" r="100" fill="#1fa3ec"></circle></svg></div> </header>
<div>
<svg width="100px" height="100px">
<circle cx="100" cy="100" r="100" fill="#1fa3ec"></circle>
</svg>
</div>
<footer> <footer>
<p><a href="#top">[Top]</a></p> <p><a href="#top">[Top]</a></p>
</footer> </footer>
</article> </article>
<article id="embedded__iframe"> <article id="embedded__iframe">
<header> <header>
<h2>IFrame</h2></header> <h2>IFrame</h2>
</header>
<div><iframe src="index.html" height="300"></iframe></div> <div><iframe src="index.html" height="300"></iframe></div>
<footer> <footer>
<p><a href="#top">[Top]</a></p> <p><a href="#top">[Top]</a></p>
@ -378,57 +467,114 @@
</section> </section>
<section id="forms"> <section id="forms">
<header> <header>
<h1>Form elements</h1></header> <h1>Form elements</h1>
</header>
<form> <form>
<fieldset id="forms__input"> <fieldset id="forms__input">
<legend>Input fields</legend> <legend>Input fields</legend>
<p> <p>
<label for="input__text">Text Input</label> <label for="input__text">Text Input</label>
<input id="input__text" type="text" placeholder="Text Input"> <input id="input__text" type="text" placeholder="Text Input" />
</p> </p>
<p> <p>
<label for="input__password">Password</label> <label for="input__password">Password</label>
<input id="input__password" type="password" placeholder="Type your Password"> <input
id="input__password"
type="password"
placeholder="Type your Password"
/>
</p> </p>
<p> <p>
<label for="input__webaddress">Web Address</label> <label for="input__webaddress">Web Address</label>
<input id="input__webaddress" type="url" placeholder="http://yoursite.com"> <input
id="input__webaddress"
type="url"
placeholder="http://yoursite.com"
/>
</p> </p>
<p> <p>
<label for="input__emailaddress">Email Address</label> <label for="input__emailaddress">Email Address</label>
<input id="input__emailaddress" type="email" placeholder="name@email.com"> <input
id="input__emailaddress"
type="email"
placeholder="name@email.com"
/>
</p> </p>
<p> <p>
<label for="input__phone">Phone Number</label> <label for="input__phone">Phone Number</label>
<input id="input__phone" type="tel" placeholder="(999) 999-9999"> <input
id="input__phone"
type="tel"
placeholder="(999) 999-9999"
/>
</p> </p>
<p> <p>
<label for="input__search">Search</label> <label for="input__search">Search</label>
<input id="input__search" type="search" placeholder="Enter Search Term"> <input
id="input__search"
type="search"
placeholder="Enter Search Term"
/>
</p> </p>
<p> <p>
<label for="input__text2">Number Input</label> <label for="input__text2">Number Input</label>
<input id="input__text2" type="number" placeholder="Enter a Number"> <input
id="input__text2"
type="number"
placeholder="Enter a Number"
/>
</p> </p>
<p> <p>
<label for="input__text3" class="error">Error</label> <label for="input__text3" class="error">Error</label>
<input id="input__text3" class="error" type="text" placeholder="Text Input"> <input
id="input__text3"
class="error"
type="text"
placeholder="Text Input"
/>
</p> </p>
<p> <p>
<label for="input__text4" class="success">Valid</label> <label for="input__text4" class="success">Valid</label>
<input id="input__text4" class="success" type="text" placeholder="Text Input"> <input
id="input__text4"
class="success"
type="text"
placeholder="Text Input"
/>
</p> </p>
<p> <p>
<label for="input__text5">Disabled Text Input</label> <label for="input__text5">Disabled Text Input</label>
<input id="input__text5" type="text" placeholder="Disabled Text Input" disabled> <input
id="input__text5"
type="text"
placeholder="Disabled Text Input"
disabled
/>
</p> </p>
<p class="grouped"> <p class="grouped">
<input type="search" name="input__text6" id="input__text6" placeholder="Search"> <input
<button class="button icon-only"><img src="https://icongr.am/feather/search.svg?size=16"></button> type="search"
name="input__text6"
id="input__text6"
placeholder="Search"
/>
<button class="button icon-only">
<img src="https://icongr.am/feather/search.svg?size=16" />
</button>
</p> </p>
<p class="grouped"> <p class="grouped">
<input type="text" name="input__text7" id="input__text7" placeholder="Username"> <input
<input type="text" name="input__text8" id="input__text8" placeholder="Password"> type="text"
name="input__text7"
id="input__text7"
placeholder="Username"
/>
<input
type="text"
name="input__text8"
id="input__text8"
placeholder="Password"
/>
<button class="button primary">Submit</button> <button class="button primary">Submit</button>
</p> </p>
</fieldset> </fieldset>
@ -450,18 +596,69 @@
<fieldset id="forms__checkbox"> <fieldset id="forms__checkbox">
<legend>Checkboxes</legend> <legend>Checkboxes</legend>
<ul class="list list--bare"> <ul class="list list--bare">
<li><label for="checkbox1"><input id="checkbox1" name="checkbox" type="checkbox" checked="checked"> Choice A</label></li> <li>
<li><label for="checkbox2"><input id="checkbox2" name="checkbox" type="checkbox"> Choice B</label></li> <label for="checkbox1"
<li><label for="checkbox3"><input id="checkbox3" name="checkbox" type="checkbox"> Choice C</label></li> ><input
id="checkbox1"
name="checkbox"
type="checkbox"
checked="checked"
/>
Choice A</label
>
</li>
<li>
<label for="checkbox2"
><input id="checkbox2" name="checkbox" type="checkbox" />
Choice B</label
>
</li>
<li>
<label for="checkbox3"
><input id="checkbox3" name="checkbox" type="checkbox" />
Choice C</label
>
</li>
</ul> </ul>
</fieldset> </fieldset>
<p><a href="#top">[Top]</a></p> <p><a href="#top">[Top]</a></p>
<fieldset id="forms__radio"> <fieldset id="forms__radio">
<legend>Radio buttons</legend> <legend>Radio buttons</legend>
<ul class="list list--bare"> <ul class="list list--bare">
<li><label for="radio1"><input id="radio1" name="radio" type="radio" class="radio" checked="checked"> Option 1</label></li> <li>
<li><label for="radio2"><input id="radio2" name="radio" type="radio" class="radio"> Option 2</label></li> <label for="radio1"
<li><label for="radio3"><input id="radio3" name="radio" type="radio" class="radio"> Option 3</label></li> ><input
id="radio1"
name="radio"
type="radio"
class="radio"
checked="checked"
/>
Option 1</label
>
</li>
<li>
<label for="radio2"
><input
id="radio2"
name="radio"
type="radio"
class="radio"
/>
Option 2</label
>
</li>
<li>
<label for="radio3"
><input
id="radio3"
name="radio"
type="radio"
class="radio"
/>
Option 3</label
>
</li>
</ul> </ul>
</fieldset> </fieldset>
<p><a href="#top">[Top]</a></p> <p><a href="#top">[Top]</a></p>
@ -469,7 +666,12 @@
<legend>Textareas</legend> <legend>Textareas</legend>
<p> <p>
<label for="textarea">Textarea</label> <label for="textarea">Textarea</label>
<textarea id="textarea" rows="8" cols="48" placeholder="Enter your message here"></textarea> <textarea
id="textarea"
rows="8"
cols="48"
placeholder="Enter your message here"
></textarea>
</p> </p>
</fieldset> </fieldset>
<p><a href="#top">[Top]</a></p> <p><a href="#top">[Top]</a></p>
@ -477,45 +679,49 @@
<legend>HTML5 inputs</legend> <legend>HTML5 inputs</legend>
<p> <p>
<label for="ic">Color input</label> <label for="ic">Color input</label>
<input type="color" id="ic" value="#000000"> <input type="color" id="ic" value="#000000" />
</p> </p>
<p> <p>
<label for="in">Number input</label> <label for="in">Number input</label>
<input type="number" id="in" min="0" max="10" value="5"> <input type="number" id="in" min="0" max="10" value="5" />
</p> </p>
<p> <p>
<label for="ir">Range input</label> <label for="ir">Range input</label>
<input type="range" id="ir" value="10"> <input type="range" id="ir" value="10" />
</p> </p>
<p> <p>
<label for="idd">Date input</label> <label for="idd">Date input</label>
<input type="date" id="idd" value="1970-01-01"> <input type="date" id="idd" value="1970-01-01" />
</p> </p>
<p> <p>
<label for="idm">Month input</label> <label for="idm">Month input</label>
<input type="month" id="idm" value="1970-01"> <input type="month" id="idm" value="1970-01" />
</p> </p>
<p> <p>
<label for="idw">Week input</label> <label for="idw">Week input</label>
<input type="week" id="idw" value="1970-W01"> <input type="week" id="idw" value="1970-W01" />
</p> </p>
<p> <p>
<label for="idt">Datetime input</label> <label for="idt">Datetime input</label>
<input type="datetime" id="idt" value="1970-01-01T00:00:00Z"> <input type="datetime" id="idt" value="1970-01-01T00:00:00Z" />
</p> </p>
<p> <p>
<label for="idtl">Datetime-local input</label> <label for="idtl">Datetime-local input</label>
<input type="datetime-local" id="idtl" value="1970-01-01T00:00"> <input
type="datetime-local"
id="idtl"
value="1970-01-01T00:00"
/>
</p> </p>
</fieldset> </fieldset>
<p><a href="#top">[Top]</a></p> <p><a href="#top">[Top]</a></p>
<fieldset id="forms__action"> <fieldset id="forms__action">
<legend>Action buttons</legend> <legend>Action buttons</legend>
<p> <p>
<input type="submit" value="<input type=submit>"> <input type="submit" value="<input type=submit>" />
<input type="button" value="<input type=button>"> <input type="button" value="<input type=button>" />
<input type="reset" value="<input type=reset>"> <input type="reset" value="<input type=reset>" />
<input type="submit" value="<input disabled>" disabled> <input type="submit" value="<input disabled>" disabled />
</p> </p>
<p> <p>
<button type="submit">&lt;button type=submit&gt;</button> <button type="submit">&lt;button type=submit&gt;</button>
@ -533,9 +739,15 @@
</p> </p>
<p> <p>
<a href="#" class="button outline">a.button.outline</a> <a href="#" class="button outline">a.button.outline</a>
<a href="#" class="button outline primary">a.button.outline.primary</a> <a href="#" class="button outline primary"
<a href="#" class="button outline secondary">a.button.outline.secondary</a> >a.button.outline.primary</a
<a href="#" class="button outline dark">a.button.outline.dark</a> >
<a href="#" class="button outline secondary"
>a.button.outline.secondary</a
>
<a href="#" class="button outline dark"
>a.button.outline.dark</a
>
<a href="#" class="button clear">a.button.clear</a> <a href="#" class="button clear">a.button.clear</a>
</p> </p>
</fieldset> </fieldset>
@ -546,5 +758,4 @@
</div> </div>
<script src="../docs/main.js"></script> <script src="../docs/main.js"></script>
</body> </body>
</html> </html>