mirror of
https://github.com/picocss/pico.git
synced 2025-04-23 01:46:14 -04:00
Docs: Add tables
This commit is contained in:
parent
ba5fd1c9e5
commit
9b489ba857
4 changed files with 148 additions and 10 deletions
|
@ -273,7 +273,7 @@ main > aside details[open] summary {
|
||||||
#grids button svg {
|
#grids button svg {
|
||||||
stroke: var(--secondary);
|
stroke: var(--secondary);
|
||||||
margin-right: .5rem;
|
margin-right: .5rem;
|
||||||
border: 3px solid currentColor;
|
border: 2px solid currentColor;
|
||||||
border-radius: 1rem;
|
border-radius: 1rem;
|
||||||
background: currentColor;
|
background: currentColor;
|
||||||
}
|
}
|
||||||
|
@ -288,6 +288,10 @@ main > aside details[open] summary {
|
||||||
margin-top: calc(var(--spacing-typography) * 2);
|
margin-top: calc(var(--spacing-typography) * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#grids details svg {
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
|
|
||||||
#forms div.grid {
|
#forms div.grid {
|
||||||
grid-row-gap: 0;
|
grid-row-gap: 0;
|
||||||
}
|
}
|
||||||
|
|
2
docs/css/pico.docs.min.css
vendored
2
docs/css/pico.docs.min.css
vendored
File diff suppressed because one or more lines are too long
144
docs/index.html
144
docs/index.html
|
@ -68,6 +68,7 @@
|
||||||
<li><a href="#typography" class="secondary">Typography</a></li>
|
<li><a href="#typography" class="secondary">Typography</a></li>
|
||||||
<li><a href="#buttons" class="secondary">Buttons</a></li>
|
<li><a href="#buttons" class="secondary">Buttons</a></li>
|
||||||
<li><a href="#forms" class="secondary">Forms</a></li>
|
<li><a href="#forms" class="secondary">Forms</a></li>
|
||||||
|
<li><a href="#tables" class="secondary">Tables</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</details>
|
</details>
|
||||||
<details open>
|
<details open>
|
||||||
|
@ -108,7 +109,7 @@
|
||||||
<pre><code><<b>link</b> <i>rel</i>=<u>"stylesheet"</u> <i>href</i>=<u>"https://unpkg.com/@picocss/pico@latest/css/pico.min.css"</u>></code></pre>
|
<pre><code><<b>link</b> <i>rel</i>=<u>"stylesheet"</u> <i>href</i>=<u>"https://unpkg.com/@picocss/pico@latest/css/pico.min.css"</u>></code></pre>
|
||||||
<h4>Install with NPM</h4>
|
<h4>Install with NPM</h4>
|
||||||
<pre><code><b>npm</b> <i>install</i> <u>@picocss/pico</u></code></pre>
|
<pre><code><b>npm</b> <i>install</i> <u>@picocss/pico</u></code></pre>
|
||||||
<p>Starter template:</p>
|
<p>Starter HTML template:</p>
|
||||||
|
|
||||||
<pre><code><em><!doctype html></em>
|
<pre><code><em><!doctype html></em>
|
||||||
<<b>html</b> <i>lang</i>=<u>"en"</u>>
|
<<b>html</b> <i>lang</i>=<u>"en"</u>>
|
||||||
|
@ -297,7 +298,7 @@
|
||||||
|
|
||||||
<p>Pico use the same breakpoints and viewports sizes as <a href="https://getbootstrap.com/docs/4.3/layout/grid/#grid-options">Bootstrap</a>.</p>
|
<p>Pico use the same breakpoints and viewports sizes as <a href="https://getbootstrap.com/docs/4.3/layout/grid/#grid-options">Bootstrap</a>.</p>
|
||||||
<figure>
|
<figure>
|
||||||
<table>
|
<table role="grid">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Device</th>
|
<th>Device</th>
|
||||||
|
@ -382,7 +383,7 @@
|
||||||
</hgroup>
|
</hgroup>
|
||||||
<p>Useful to have responsives <code><<b>table</b>></code></p>
|
<p>Useful to have responsives <code><<b>table</b>></code></p>
|
||||||
<figure>
|
<figure>
|
||||||
<table>
|
<table role="grid">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">#</th>
|
<th scope="col">#</th>
|
||||||
|
@ -453,7 +454,7 @@
|
||||||
<h3>All typographic elements are responsives, allowing text to scale gracefully across devices and viewport sizes.</h3>
|
<h3>All typographic elements are responsives, allowing text to scale gracefully across devices and viewport sizes.</h3>
|
||||||
</hgroup>
|
</hgroup>
|
||||||
<figure>
|
<figure>
|
||||||
<table>
|
<table role="grid">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Device</th>
|
<th>Device</th>
|
||||||
|
@ -532,15 +533,13 @@
|
||||||
<h4>Heading 4</h4>
|
<h4>Heading 4</h4>
|
||||||
<h5>Heading 5</h5>
|
<h5>Heading 5</h5>
|
||||||
<h6>Heading 6</h6>
|
<h6>Heading 6</h6>
|
||||||
<p>Paragraph</p>
|
|
||||||
|
|
||||||
<pre><code><<b>h1</b>>Heading 1</<b>h1</b>>
|
<pre><code><<b>h1</b>>Heading 1</<b>h1</b>>
|
||||||
<<b>h2</b>>Heading 2</<b>h2</b>>
|
<<b>h2</b>>Heading 2</<b>h2</b>>
|
||||||
<<b>h3</b>>Heading 3</<b>h3</b>>
|
<<b>h3</b>>Heading 3</<b>h3</b>>
|
||||||
<<b>h4</b>>Heading 4</<b>h4</b>>
|
<<b>h4</b>>Heading 4</<b>h4</b>>
|
||||||
<<b>h5</b>>Heading 5</<b>h5</b>>
|
<<b>h5</b>>Heading 5</<b>h5</b>>
|
||||||
<<b>h6</b>>Heading 6</<b>h6</b>>
|
<<b>h6</b>>Heading 6</<b>h6</b>></code></pre>
|
||||||
<<b>p</b>>Paragraph</<b>p</b>></code></pre>
|
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
<p>Inside a <code><<b>hgroup</b>></code> all <code><i>margin-bottom</i></code> are collapsed and the <code>:last-child</code> is styled.</p>
|
<p>Inside a <code><<b>hgroup</b>></code> all <code><i>margin-bottom</i></code> are collapsed and the <code>:last-child</code> is styled.</p>
|
||||||
|
@ -587,6 +586,23 @@
|
||||||
<<b>a</b> <i>href</i>=<u>"#"</u> <i>class</i>=<u>"secondary"</u>>Secondary</<b>a</b>>
|
<<b>a</b> <i>href</i>=<u>"#"</u> <i>class</i>=<u>"secondary"</u>>Secondary</<b>a</b>>
|
||||||
<<b>a</b> <i>href</i>=<u>"#"</u> <i>class</i>=<u>"contrast"</u>>Contrast</<b>a</b>></code></pre>
|
<<b>a</b> <i>href</i>=<u>"#"</u> <i>class</i>=<u>"contrast"</u>>Contrast</<b>a</b>></code></pre>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
<p>Blockquote:</p>
|
||||||
|
<article aria-label="Links examples">
|
||||||
|
<blockquote>
|
||||||
|
"Maecenas vehicula metus tellus, vitae congue turpis hendrerit non. Nam at dui sit amet ipsum cursus ornare."
|
||||||
|
<footer>
|
||||||
|
<cite>- Phasellus eget lacinia</cite>
|
||||||
|
</footer>
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
|
<pre><code><<b>blockquote</b>>
|
||||||
|
"Maecenas vehicula metus tellus, vitae congue turpis hendrerit non. Nam at dui sit amet ipsum cursus ornare."
|
||||||
|
<<b>footer</b>>
|
||||||
|
<<b>cite</b>>- Phasellus eget lacinia</<b>cite</b>>
|
||||||
|
</<b>footer</b>>
|
||||||
|
</<b>blockquote</b>></code></pre>
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
</section><!-- ./ Docs: Typography -->
|
</section><!-- ./ Docs: Typography -->
|
||||||
|
|
||||||
|
@ -785,6 +801,120 @@
|
||||||
<p>Advanced example with all form elements supported in Pico <a href="https://picocss.com/examples/form-elements/">here</a>.</p>
|
<p>Advanced example with all form elements supported in Pico <a href="https://picocss.com/examples/form-elements/">here</a>.</p>
|
||||||
</section><!-- ./ Docs: Form -->
|
</section><!-- ./ Docs: Form -->
|
||||||
|
|
||||||
|
<!-- Docs: Tables -->
|
||||||
|
<section id="tables">
|
||||||
|
<hgroup>
|
||||||
|
<h2>Tables</h2>
|
||||||
|
<h3>Default styles for tables without <code>.classes</code></h3>
|
||||||
|
</hgroup>
|
||||||
|
<figure>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">#</th>
|
||||||
|
<th scope="col">Heading</th>
|
||||||
|
<th scope="col">Heading</th>
|
||||||
|
<th scope="col">Heading</th>
|
||||||
|
<th scope="col">Heading</th>
|
||||||
|
<th scope="col">Heading</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">1</th>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">2</th>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">3</th>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</figure>
|
||||||
|
|
||||||
|
<pre><code><<b>table</b>>
|
||||||
|
<<b>thead</b>>
|
||||||
|
<<b>tr</b>>
|
||||||
|
<<b>th</b> <i>scope</i>=<u>"col"</u>>#</<b>th</b>>
|
||||||
|
<<b>th</b> <i>scope</i>=<u>"col"</u>>Heading<</<b>th</b>>
|
||||||
|
<<b>th</b> <i>scope</i>=<u>"col"</u>>Heading</<b>th</b>>
|
||||||
|
<<b>th</b> <i>scope</i>=<u>"col"</u>>Heading</<b>th</b>>
|
||||||
|
</<b>tr</b>>
|
||||||
|
</<b>thead</b>>
|
||||||
|
<<b>tbody</b>>
|
||||||
|
<<b>tr</b>>
|
||||||
|
<<b>th</b> <i>scope</i>=<u>"row"</u>>1</<b>th</b>>
|
||||||
|
<<b>td</b>>Cell</<b>td</b>>
|
||||||
|
<<b>td</b>>Cell</<b>td</b>>
|
||||||
|
<<b>td</b>>Cell</<b>td</b>>
|
||||||
|
</<b>tr</b>>
|
||||||
|
</<b>tbody</b>>
|
||||||
|
</<b>table</b>></code></pre>
|
||||||
|
|
||||||
|
<p><code><i>role</i>=<u>"grid"</u></code> enable striped rows.</p>
|
||||||
|
<figure>
|
||||||
|
<table role="grid">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">#</th>
|
||||||
|
<th scope="col">Heading</th>
|
||||||
|
<th scope="col">Heading</th>
|
||||||
|
<th scope="col">Heading</th>
|
||||||
|
<th scope="col">Heading</th>
|
||||||
|
<th scope="col">Heading</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">1</th>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">2</th>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">3</th>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
<td>Cell</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</figure>
|
||||||
|
|
||||||
|
<pre><code><<b>table</b> <i>role</i>=<u>"grid"</u>>
|
||||||
|
<em>...</em>
|
||||||
|
</<b>table</b>></code></pre>
|
||||||
|
|
||||||
|
</section><!-- ./ Docs: Tables -->
|
||||||
|
|
||||||
<!-- Docs: Accordions -->
|
<!-- Docs: Accordions -->
|
||||||
<section id="accordions">
|
<section id="accordions">
|
||||||
<hgroup>
|
<hgroup>
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
svg {
|
svg {
|
||||||
stroke: var(--secondary);
|
stroke: var(--secondary);
|
||||||
margin-right: .5rem;
|
margin-right: .5rem;
|
||||||
border: 3px solid currentColor;
|
border: 2px solid currentColor;
|
||||||
border-radius: 1rem;
|
border-radius: 1rem;
|
||||||
background: currentColor;
|
background: currentColor;
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,10 @@
|
||||||
|
|
||||||
details {
|
details {
|
||||||
margin-top: calc(var(--spacing-typography) * 2);
|
margin-top: calc(var(--spacing-typography) * 2);
|
||||||
|
|
||||||
|
svg {
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue