mirror of
https://github.com/picocss/pico.git
synced 2025-04-26 19:26:14 -04:00
Improvements
- Edit code colors and add a color for comments - Add ::selection - Small edits for cards: last-child and overflow - Add card-sectioning (header, footer, pre) - Change global hue for Primary color - Remove border for pre - Add querySelectorAll() for theme-switcher.js - Update docs
This commit is contained in:
parent
c3f9d8d8c8
commit
85e21d35de
23 changed files with 937 additions and 422 deletions
|
@ -113,7 +113,7 @@
|
|||
<pre><code><<b>link</b> <i>rel</i>=<u>"stylesheet"</u> <i>href</i>=<u>"css/pico.min.css"</u>></code></pre>
|
||||
<p>Starter template:</p>
|
||||
|
||||
<pre><code><!doctype html>
|
||||
<pre><code><em><!doctype html></em>
|
||||
<<b>html</b> <i>lang</i>=<u>"en"</u>>
|
||||
<<b>head</b>>
|
||||
<<b>meta</b> <i>charset</i>=<u>"utf-8"</u>>
|
||||
|
@ -211,18 +211,18 @@
|
|||
|
||||
<p>SCSS:</p>
|
||||
|
||||
<pre data-theme="generated"><code>// <span class="name">Custom colors</span>
|
||||
<pre><code><em>// <span class="name">Custom colors</em></span>
|
||||
<i>$primary-500</i>: <u class="c500">...</u>;
|
||||
<i>$primary-600</i>: <u class="c600">...</u>;
|
||||
<i>$primary-700</i>: <u class="c700">...</u>;
|
||||
|
||||
// Pico library
|
||||
<em>// Pico library</em>
|
||||
<b>@import</b> <u>"path/pico"</u>;</code></pre>
|
||||
|
||||
<p>CSS:</p>
|
||||
|
||||
<pre data-theme="generated"><code>/* <span class="name"></span>Light theme (Default) */
|
||||
/* Can be forced with data-theme="light" */
|
||||
<pre><code><em>/* <span class="name"></span>Light theme (Default) */
|
||||
/* Can be forced with data-theme="light" */</em>
|
||||
<b>[data-theme=<u>"light"</u>]</b>,
|
||||
<b>:root:not([data-theme=<u>"dark"</u>])</b> {
|
||||
<i>--primary</i>: <u class="c600">...</u>;
|
||||
|
@ -232,8 +232,8 @@
|
|||
}
|
||||
|
||||
|
||||
/* <span class="name"></span>Dark theme (Auto) */
|
||||
/* Automatically enabled if user has Dark mode enabled */
|
||||
<em>/* <span class="name"></span>Dark theme (Auto) */
|
||||
/* Automatically enabled if user has Dark mode enabled */</em>
|
||||
<i>@media</i> only <b>screen</b> and <b>(prefers-color-scheme: <u>dark</u>)</b> {
|
||||
<b>:root:not([data-theme="light"])</b> {
|
||||
<i>--primary</i>: <u class="c600">...</u>;
|
||||
|
@ -243,8 +243,8 @@
|
|||
}
|
||||
|
||||
|
||||
/* <span class="name"></span>Dark theme (Forced) */
|
||||
/* Enabled if forced with data-theme="dark" */
|
||||
<em>/* <span class="name"></span>Dark theme (Forced) */
|
||||
/* Enabled if forced with data-theme="dark" */</em>
|
||||
<b>[data-theme="<u>dark</u>"]</b> {
|
||||
<i>--primary</i>: <u class="c600">...</u>;
|
||||
<i>--primary-hover</i>: <u class="c500">...</u>;
|
||||
|
@ -264,7 +264,6 @@
|
|||
<h3>For wild HTML purists!</h3>
|
||||
</hgroup>
|
||||
<p>Pico provide a <code>.classless</code> version (<a href="https://picocss.com/examples/classless/">Example</a>).</p>
|
||||
<p>Obviously this version do not include <code>.container</code>, <code>.container-fluid</code>, <code>.grid</code>, <code>.secondary</code>, <code>.contrast</code> and <code>.outline</code>.</p>
|
||||
<p>In this version, <code><<b>header</b>></code>, <code><<b>main</b>></code> and <code><<b>footer</b>></code> act as <a href="#containers">containers</a> to define a centered or a fluid viewport.</p>
|
||||
<p><strong>Usage:</strong></p>
|
||||
<p>Use the default <code>.classless</code> version if you need centered viewports:</p>
|
||||
|
@ -656,11 +655,11 @@
|
|||
<pre><code>
|
||||
<<b>form</b>>
|
||||
|
||||
<!-- Grid -->
|
||||
<em><!-- Grid --></em>
|
||||
<<b>section</b> <i>class</i>=<u>"grid"</u>>
|
||||
|
||||
<<b>div</b>>
|
||||
<!-- Markup example 1: input is inside label -->
|
||||
<em><!-- Markup example 1: input is inside label --></em>
|
||||
<<b>label</b> <i>for</i>=<u>"firstname"</u>>
|
||||
First name
|
||||
<<b>input</b> <i>type</i>=<u>"text"</u> <i>id</i>=<u>"firstname"</u> <i>name</i>=<u>"firstname"</u> <i>placeholder</i>=<u>"First name"</u> <i>required</i>>
|
||||
|
@ -676,12 +675,12 @@
|
|||
|
||||
</<b>section</b>>
|
||||
|
||||
<!-- Markup example 2: input is after label -->
|
||||
<em><!-- Markup example 2: input is after label --></em>
|
||||
<<b>label</b> <i>for</i>=<u>"email"</u>>Email address</<b>label</b>>
|
||||
<<b>input</b> <i>type</i>=<u>"email"</u> <i>id</i>=<u>"email"</u> <i>name</i>=<u>"email"</u> <i>placeholder</i>=<u>"Email address"</u> <i>required</i>>
|
||||
<<b>small</b>>We'll never share your email with anyone else.</<b>small</b>>
|
||||
|
||||
<!-- Button -->
|
||||
<em><!-- Button --></em>
|
||||
<<b>button</b> <i>type</i>=<u>"submit"</u>>Submit</<b>button</b>>
|
||||
|
||||
</<b>form</b>></code></pre>
|
||||
|
@ -748,14 +747,14 @@
|
|||
</label>
|
||||
</fieldset>
|
||||
|
||||
<pre><code><!-- Select -->
|
||||
<pre><code><em><!-- Select --></em>
|
||||
<<b>label</b> <i>for</i>=<u>"country"</u>>Country</<b>label</b>>
|
||||
<<b>select</b> <i>id</i>=<u>"country</u>">
|
||||
<<b>option</b> <i>selected</i>>Choose...</<b>option</b>>
|
||||
<<b>option</b>>...</<b>option</b>>
|
||||
</<b>select</b>>
|
||||
|
||||
<!-- Radios -->
|
||||
<em><!-- Radios --></em>
|
||||
<<b>fieldset</b>>
|
||||
<<b>legend</b>>Gender</<b>legend</b>>
|
||||
<<b>label</b> <i>for</i>=<u>"male"</u>>
|
||||
|
@ -772,7 +771,7 @@
|
|||
</<b>label</b>>
|
||||
</<b>fieldset</b>>
|
||||
|
||||
<!-- Checkbox -->
|
||||
<em><!-- Checkbox --></em>
|
||||
<<b>fieldset</b>>
|
||||
<<b>label</b> <i>for</i>=<u>"terms"</u>>
|
||||
<<b>input</b> <i>type</i>=<u>"checkbox"</u> <i>id</i>=<u>"terms"</u> <i>name</i>=<u>"terms"</u>>
|
||||
|
@ -780,7 +779,7 @@
|
|||
</<b>label</b>>
|
||||
</<b>fieldset</b>>
|
||||
|
||||
<!-- Switch -->
|
||||
<em><!-- Switch --></em>
|
||||
<<b>fieldset</b>>
|
||||
<<b>label</b> <i>for</i>=<u>"switch"</u>>
|
||||
<<b>input</b> <i>type</i>=<u>"checkbox"</u> <i>id</i>=<u>"switch"</u> <i>name</i>=<u>"switch"</u> <i>role</i>=<u>"switch"</u>>
|
||||
|
@ -842,6 +841,27 @@
|
|||
I'm a card!
|
||||
</<b>article</b>></code></pre>
|
||||
|
||||
<p>You can use <code><<b>header</b>></code> and footer <code><<b>footer</b>></code> inside <code><<b>article</b>></code></p>
|
||||
<article>
|
||||
<header>
|
||||
Header
|
||||
</header>
|
||||
Body
|
||||
<footer>
|
||||
Footer
|
||||
</footer>
|
||||
</article>
|
||||
|
||||
<pre><code><<b>article</b>>
|
||||
<<b>header</b>>
|
||||
Header
|
||||
</<b>header</b>>
|
||||
Body
|
||||
<<b>footer</b>>
|
||||
Footer
|
||||
</<b>footer</b>>
|
||||
</<b>article</b>></code></pre>
|
||||
|
||||
</section><!-- ./ Docs: Card -->
|
||||
|
||||
<!-- Docs: Navs -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue