Documentation

This commit is contained in:
Lucas 2019-11-28 07:20:36 +07:00
parent 80ce6f23c1
commit f5e4d01cbb
18 changed files with 429 additions and 427 deletions

View file

@ -29,7 +29,7 @@
<li><a href="#start" class="secondary">Start</a></li>
<li><a href="#docs" class="secondary">Docs</a></li>
<li>
<a href="#" class="secondary">
<a href="https://github.com/picocss/pico" class="secondary">
<svg aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512" height="1rem">
<path fill="currentColor" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path>
</svg>
@ -107,21 +107,33 @@
<h2>Usage</h2>
<p>Work without package manager or dependencies 🙂!</p>
</hgroup>
<p>1. Download Pico CSS:</p>
<p>1. Download Pico:</p>
<p><a href="https://github.com/picocss/pico/archive/master.zip" role="button">Download pico.css</a></p>
<p>2. Link the CSS <small>(~5KB minified and gzipped)</small>:</p>
<pre><code>&lt;<b>link</b> <i>rel</i>=<u>"stylesheet"</u> <i>href</i>=<u>"css/pico.min.css"</u>&gt;</code></pre>
<p><strong>Customization:</strong></p>
<p>You can compile your own version of Pico: Sass sources are included.</p>
<p>A <a href="#classless">class-less version</a> is also included in the library.</p>
<p></p>
<p>Starter template:</p>
<pre><code>&lt;!doctype html&gt;
&lt;<b>html</b> <i>lang</i>=<u>"en"</u>&gt;
&lt;<b>head</b>&gt;
&lt;<b>meta</b> <i>charset</i>=<u>"utf-8"</u>&gt;
&lt;<b>meta</b> <i>name</i>=<u>"viewport"</u> <i>content</i>=<u>"width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover"</u>&gt;
&lt;<b>link</b> <i>rel</i>=<u>"stylesheet"</u> <i>href</i>=<u>"css/pico.min.css"</u>&gt;
&lt;<b>title</b>>Hello, world!&lt;/<b>title</b>&gt;
&lt;/<b>head</b>&gt;
&lt;<b>body</b>&gt;
&lt;<b>main</b> <i>class</i>=<u>"container"</u>&gt;
&lt;<b>h1</b>&gt;Hello, world!&lt;/<b>h1</b>&gt;
&lt;/<b>main</b>&gt;
&lt;/<b>body</b>&gt;
&lt;/<b>html</b>&gt;</code></pre>
</section><!-- ./ Docs: Start -->
<!-- Docs: Themes -->
<section id="themes">
<a name="themes"></a>
<hgroup>
<h2>Customize</h2>
<h2>Themes</h2>
<p>Pico is shipped with 2 consistents themes: Light & Dark.<p>
</hgroup>
<p>The Light theme is used by default. The Dark theme is automatically enabled if user has dark mode enabled <code><i>prefers-color-scheme</i>: <u>dark</u></code>.</p>
@ -337,7 +349,7 @@
&lt;/<b>section</b>&gt;</code></pre>
</article>
<p>Columns intentionally collapses for small and medium devices (below <code><u>992px</u></code>).</p>
<p>Columns intentionally collapses below large devices <code>(<u>992px</u>)</code>.</p>
</section><!-- ./ Docs: Grid -->
<!-- Docs: Horizontal scroller -->
@ -519,7 +531,7 @@
<a name="buttons"></a>
<hgroup>
<h2>Buttons</h2>
<p>The essential button in pure html, without <code>.classes</code> for the default style.</p>
<p>The essential button in pure HTML, without <code>.classes</code> for the default style.</p>
</hgroup>
<article>
<button>Button</button>
@ -570,7 +582,7 @@
<a name="forms"></a>
<hgroup>
<h2>Forms</h2>
<p>All form elements in pure html, without <code>.classes</code> and responsives, allowing forms to scale gracefully across devices and viewport sizes.</p>
<p>All form elements in pure semantic HTML and fully responsives, allowing forms to scale gracefully across devices and viewport sizes.</p>
</hgroup>
<p>Input are <code><i>width</i>: <u>100%</u>;</code> by default. You can use <code>.grid</code> inside a form.</p>
<p>All natives form elements are fully customized and themables with CSS variables.</p>
@ -739,7 +751,7 @@
<a name="accordions"></a>
<hgroup>
<h2>Accordions</h2>
<p>Toggle sections of content in pure HTML, without Javascript.</p>
<p>Toggle sections of content in pure HTML, without JavaScript.</p>
</hgroup>
<article>
<details>
@ -794,7 +806,7 @@
<a name="navs"></a>
<hgroup>
<h2>Navs</h2>
<p>The essential navbar in pure semantic HTML.</p>
<p>The essential navbar component in pure semantic HTML.</p>
</hgroup>
<article>
<nav>
@ -893,7 +905,7 @@
<a name="tooltips"></a>
<hgroup>
<h2>Tooltips</h2>
<p>Enable tooltips everywhere in pure HTML, without Javascript.</p>
<p>Enable tooltips everywhere in pure HTML, without JavaScript.</p>
</hgroup>
<article>
<p>Tooltip on a <a href="#" data-tooltip="Tooltip">link</a></p>
@ -902,7 +914,7 @@
<pre><code>&lt;<b>p</b>&gt;Tooltip on a &lt;<b>a</b> <i>href</i>=<u>"#"</u> <i>data-tooltip</i>=<u>"Tooltip"</u>&gt;link&lt;/<b>a</b>&gt;&lt;/<b>p</b>&gt;
&lt;<b>p</b>&gt;Tooltip on &lt;<b>em</b> <i>data-tooltip</i>=<u>"Tooltip"</u>&gt;inline element&lt;/<b>em</b>&gt;&lt;/<b>p</b>&gt;
&lt;<b>p</b>&gt;&lt;<b>button</b> <i>data-tooltip</i>=<u>"Tooltip"</u>&gt;Tooltip on a button&lt;/<b>button</b>&gt;&lt;/p&gt;</code></pre>
&lt;<b>p</b>&gt;&lt;<b>button</b> <i>data-tooltip</i>=<u>"Tooltip"</u>&gt;Tooltip on a button&lt;/<b>button</b>&gt;&lt;/<b>p</b>&gt;</code></pre>
</article>
</section><!-- ./ Docs: Nav -->
@ -921,7 +933,7 @@
</hgroup>
<p>As a starting point, Pico chose to be as neutral and semantic as possible using very few <code>.classes</code>.</p>
<p>But, off course, <code>.classes</code> are not a bad practice at all.</p>
<p>But off course, <code>.classes</code> are not a bad practice at all.</p>
<p>Feel free to use <em>modifiers</em>.</p>
<section data-theme="valid">
@ -941,11 +953,11 @@
<p><small>Openly inspired by <a href="https://getbootstrap.com/" class="secondary">Bootstrap</a>, <a href="https://picturepan2.github.io/spectre/" class="secondary">Spectre</a>, <a href=" https://kbrsh.github.io/wing/" class="secondary">Wing</a>, <a href="https://www.cssbed.com/" class="secondary">CSS Bed</a> & <a href="http://necolas.github.io/normalize.css/" class="secondary">Normalize</a>.</small></p>
</footer><!-- ./ Footer -->
</div> <!-- ./ Document -->
</div><!-- ./ Document -->
</main><!-- ./ Main -->
<!-- Javascript -->
<!-- JavaScript -->
<script src="js/pico.docs.min.js"></script>
</body>