Skip to content

Commit

Permalink
feat(elements): add table class param usage
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyboar committed Dec 6, 2022
1 parent 95021f1 commit 602b8a0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<div class="o-fixed-header-table">
{{> @table data=data caption="Header stays pinned top top of container on scroll." }}
</div>
<dl>
<dt>Class Directly on Table</dt>
<dd>
{{> @table data=data caption="Header stays pinned top top of container on scroll." class="o-fixed-header-table" }}
</dd>
</dl>
<dl>
<dt>Class on Table Wrapper</dt>
<dd class="o-fixed-header-table">
{{> @table data=data caption="Header stays pinned top top of container on scroll." }}
</dd>
</dl>
2 changes: 2 additions & 0 deletions src/lib/_imports/objects/o-fixed-header-table/readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
A [table]({{path './table' }}) with its header pinned during vertical scroll.

_Do not add the class to a wrapper unless your use case demands one. Do not create a wrapper unless your use case demands it. (One may already exist.)_

> **?&#x20DD; Explanation**
>
> [You can’t position: sticky; a `<thead>`. Nor a `<tr>`. But you can sticky a `<th>`][source]
Expand Down

0 comments on commit 602b8a0

Please sign in to comment.