-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(grid): update elements example, grid pkg readme (#9339)
* docs(grid): update elements example, grid pkg readme * chore: remove wip work no longer needed * fix(grid): update css-grid elements example lockfile Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
f0d1717
commit 4f11064
Showing
10 changed files
with
237 additions
and
435 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,172 +1,177 @@ | ||
export default function IndexPage() { | ||
return ( | ||
<> | ||
<h1>CSS Grid Demo</h1> | ||
<h1>Experimental CSS Grid</h1> | ||
<section> | ||
<h2>CSS Grid</h2> | ||
<article className="example"> | ||
<div className="bx--css-grid"> | ||
<div className="content"> | ||
Span 1 | ||
</div> | ||
<div className="content bx--col-span-2"> | ||
Span 2 | ||
</div> | ||
<div className="content"> | ||
Span 1 | ||
</div> | ||
<div className="content"> | ||
Span 1 | ||
</div> | ||
</div> | ||
</article> | ||
<h2>Wide</h2> | ||
<div class="bx--css-grid"> | ||
<div class="bx--sm:col-span-4"></div> | ||
<div class="bx--sm:col-span-4"></div> | ||
<div class="bx--sm:col-span-4"></div> | ||
<div class="bx--sm:col-span-4"></div> | ||
</div> | ||
</section> | ||
|
||
<section> | ||
<h2>Responsive</h2> | ||
<h2>Narrow</h2> | ||
<div class="bx--css-grid bx--css-grid--narrow"> | ||
<div class="bx--sm:col-span-4"></div> | ||
<div class="bx--sm:col-span-4"></div> | ||
<div class="bx--sm:col-span-4"></div> | ||
<div class="bx--sm:col-span-4"></div> | ||
</div> | ||
</section> | ||
<article className="example"> | ||
<div className="bx--css-grid"> | ||
<div className="content bx--col-span-1 bx--md:col-span-2 bx--lg:col-span-4">25%</div> | ||
<div className="content bx--col-span-1 bx--md:col-span-2 bx--lg:col-span-4">25%</div> | ||
<div className="content bx--col-span-1 bx--md:col-span-2 bx--lg:col-span-4">25%</div> | ||
<div className="content bx--col-span-1 bx--md:col-span-2 bx--lg:col-span-4">25%</div> | ||
<div className="content bx--col-span-4 bx--md:col-span-6 bx--lg:col-span-12 bx--xlg:col-span-10 bx--max:col-span-8"> | ||
Responsive | ||
</div> | ||
|
||
<section> | ||
<h2>Condensed</h2> | ||
<div class="bx--css-grid bx--css-grid--condensed"> | ||
<div class="bx--sm:col-span-4"></div> | ||
<div class="bx--sm:col-span-4"></div> | ||
<div class="bx--sm:col-span-4"></div> | ||
<div class="bx--sm:col-span-4"></div> | ||
</div> | ||
</article> | ||
</section> | ||
|
||
<section> | ||
<h2>Offset</h2> | ||
<article className="example"> | ||
<div className="bx--css-grid"> | ||
<div className="content bx--col-start-8">Start 8</div> | ||
<div className="content bx--col-start-7 bx--col-span-2">Start 7</div> | ||
<div className="content bx--col-start-6 bx--col-span-3">Start 6</div> | ||
<div className="content bx--col-start-5 bx--col-span-4">Start 5</div> | ||
<div className="content bx--col-start-4 bx--col-span-5">Start 4</div> | ||
<div className="content bx--col-start-3 bx--col-span-6">Start 3</div> | ||
<div className="content bx--col-start-2 bx--col-span-7">Start 2</div> | ||
<div className="content bx--col-start-1 bx--col-span-8">Start 1</div> | ||
<div className="content bx--col-start-4 bx--col-end-7"> | ||
Start 4, End 7 | ||
</div> | ||
</div> | ||
</article> | ||
<h2>Full Width</h2> | ||
<div class="bx--css-grid bx--css-grid--full-width"> | ||
<div class="bx--sm:col-span-4"></div> | ||
<div class="bx--sm:col-span-4"></div> | ||
<div class="bx--sm:col-span-4"></div> | ||
<div class="bx--sm:col-span-4"></div> | ||
</div> | ||
</section> | ||
|
||
<section> | ||
<h2>Gap (condensed, narrow, no gutters)</h2> | ||
<article className="example"> | ||
<div className="bx--css-grid bx--css-grid--condensed"> | ||
<div className="content"> | ||
Span 1 | ||
</div> | ||
<div className="content bx--col-span-2"> | ||
Span 2 | ||
</div> | ||
<div className="content"> | ||
Span 1 | ||
</div> | ||
<div className="content"> | ||
Span 1 | ||
</div> | ||
<h2>Responsive</h2> | ||
<div class="bx--css-grid"> | ||
<div class="bx--sm:col-span-2 bx--md:col-span-4 bx--lg:col-span-6"> | ||
<p>Small: Span 2 of 4</p> | ||
<p>Medium: Span 4 of 8</p> | ||
<p>Large: Span 6 of 16</p> | ||
</div> | ||
</article> | ||
<article className="example"> | ||
<div className="bx--css-grid bx--css-grid--narrow"> | ||
<div className="content bx--col-span-1"> | ||
Span 1 | ||
</div> | ||
<div className="content bx--col-span-2"> | ||
Span 2 | ||
</div> | ||
<div className="content bx--col-span-1"> | ||
Span 1 | ||
</div> | ||
<div className="content bx--col-span-1"> | ||
Span 1 | ||
</div> | ||
<div class="bx--sm:col-span-2 bx--md:col-span-2 bx--lg:col-span-3"> | ||
<p>Small: Span 2 of 4</p> | ||
<p>Medium: Span 2 of 8</p> | ||
<p>Large: Span 3 of 16</p> | ||
</div> | ||
</article> | ||
<article className="example"> | ||
<div className="bx--css-grid bx--css-grid--no-gutter"> | ||
<div className="content"> | ||
Span 1 | ||
</div> | ||
<div className="content bx--col-span-2"> | ||
Span 2 | ||
</div> | ||
<div className="content"> | ||
Span 1 | ||
</div> | ||
<div className="content"> | ||
Span 1 | ||
</div> | ||
<div class="bx--sm:col-span-0 bx--md:col-span-2 bx--lg:col-span-3"> | ||
<p>Small: Span 0 of 4</p> | ||
<p>Medium: Span 2 of 8</p> | ||
<p>Large: Span 3 of 16</p> | ||
</div> | ||
</article> | ||
</section> | ||
<section> | ||
<h2>Gutter helpers</h2> | ||
<article className="example"> | ||
<div className="bx--css-grid bx--css-grid--no-gutter"> | ||
<div className="content bx--gutter-start"> | ||
Span 1 | ||
</div> | ||
<div className="content bx--col-span-2 bx--gutter-end"> | ||
Span 2 | ||
</div> | ||
<div className="content bx--gutter-start"> | ||
Span 1 | ||
</div> | ||
<div className="content bx--gutter-end"> | ||
Span 1 | ||
</div> | ||
<div class="bx--sm:col-span-0 bx--md:col-span-0 bx--lg:col-span-4"> | ||
<p>Small: Span 0 of 4</p> | ||
<p>Medium: Span 0 of 8</p> | ||
<p>Large: Span 4 of 16</p> | ||
</div> | ||
</article> | ||
</div> | ||
</section> | ||
|
||
<section> | ||
<h2>Subgrid</h2> | ||
<div className="example"> | ||
<div className="bx--css-grid"> | ||
<div className="bx--col-span-75 bx--subgrid"> | ||
</div> | ||
<div className="content bx--col-span-25"> | ||
25% | ||
<div class="bx--css-grid"> | ||
<div class="bx--sm:col-span-2 bx--md:col-span-4 bx--lg:col-span-3"> | ||
<p>Small: Span 2 of 4</p> | ||
<p>Medium: Span 4 of 8</p> | ||
<p>Large: Span 3 of 16</p> | ||
</div> | ||
<div class="bx--sm:col-span-2 bx--md:col-span-4 bx--lg:col-span-10"> | ||
<p>Small: Span 2 of 4</p> | ||
<p>Medium: Span 4 of 8</p> | ||
<p>Large: Span 10 of 16</p> | ||
<div class="example bx--subgrid"> | ||
<div class="bx--sm:col-span-1 bx--md:col-span-1 bx--lg:col-span-2"> | ||
<p>sm=1</p> <p>md=1</p> <p>lg=2</p> | ||
</div> | ||
<div class="bx--sm:col-span-1 bx--md:col-span-1 bx--lg:col-span-2"> | ||
<p>sm=1</p> <p>md=1</p> <p>lg=2</p> | ||
</div> | ||
<div class="bx--sm:col-span-0 bx--md:col-span-1 bx--lg:col-span-1"> | ||
<p>sm=0</p> <p>md=1</p> <p>lg=1</p> | ||
</div> | ||
<div class="bx--sm:col-span-0 bx--md:col-span-1 bx--lg:col-span-1"> | ||
<p>sm=0</p> <p>md=1</p> <p>lg=1</p> | ||
</div> | ||
<div class="bx--sm:col-span-0 bx--md:col-span-0 bx--lg:col-span-1"> | ||
<p>sm=0</p> <p>md=0</p> <p>lg=1</p> | ||
</div> | ||
<div class="bx--sm:col-span-0 bx--md:col-span-0 bx--lg:col-span-1"> | ||
<p>sm=0</p> <p>md=0</p> <p>lg=1</p> | ||
</div> | ||
<div class="bx--sm:col-span-0 bx--md:col-span-0 bx--lg:col-span-1"> | ||
<p>sm=0</p> <p>md=0</p> <p>lg=1</p> | ||
</div> | ||
<div class="bx--sm:col-span-0 bx--md:col-span-0 bx--lg:col-span-1"> | ||
<p>sm=0</p> <p>md=0</p> <p>lg=1</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="bx--sm:col-span-0 bx--md:col-span-0 bx--lg:col-span-3"> | ||
<p>Small: Span 0 of 4</p> | ||
<p>Medium: Span 0 of 8</p> | ||
<p>Large: Span 3 of 16</p> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
<section> | ||
<h2>Relative</h2> | ||
<div className="example"> | ||
<div className="bx--css-grid"> | ||
<div className="bx--col-span-100"> | ||
<div className="content">100%</div> | ||
</div> | ||
<div className="bx--col-span-75"> | ||
<div className="content">75%</div> | ||
</div> | ||
<div className="bx--col-span-25"> | ||
<div className="content">25%</div> | ||
<h2>Mixed Grid Modes</h2> | ||
<div class="bx--css-grid"> | ||
<div class="bx--sm:col-span-1 bx--md:col-span-2 bx--lg:col-span-4"> | ||
<div class="bx--css-grid--narrow bx--subgrid"> | ||
<div class="bx--sm:col-span-1 bx--md:col-span-2 bx--lg:col-span-4"> | ||
<p>narrow</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div className="bx--css-grid"> | ||
<div className="bx--col-span-50"> | ||
<div className="content">50%</div> | ||
</div> | ||
<div className="bx--col-span-50"> | ||
<div className="content">50%</div> | ||
<div class="bx--sm:col-span-3 bx--md:col-span-6 bx--lg:col-span-12"> | ||
<div class="bx--css-grid--condensed bx--subgrid"> | ||
<div class="bx--sm:col-span-3 bx--md:col-span-6 bx--lg:col-span-12"> | ||
<p>condensed</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div className="bx--css-grid"> | ||
<div className="bx--col-span-25"> | ||
<div className="content">25%</div> | ||
<div class="bx--sm:col-span-1 bx--md:col-span-2 bx--lg:col-span-4"> | ||
<div class="bx--css-grid--condensed bx--subgrid"> | ||
<div class="bx--sm:col-span-1 bx--md:col-span-2 bx--lg:col-span-4"> | ||
<p>condensed</p> | ||
</div> | ||
</div> | ||
<div className="bx--col-span-75"> | ||
<div className="content">75%</div> | ||
</div> | ||
<div class="bx--sm:col-span-3 bx--md:col-span-6 bx--lg:col-span-12"> | ||
<div class="bx--css-grid--narrow bx--subgrid"> | ||
<div class="bx--sm:col-span-3 bx--md:col-span-6 bx--lg:col-span-12"> | ||
<p>narrow</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
<section> | ||
<h2>Offset</h2> | ||
<div class="bx--css-grid"> | ||
<div class="bx--sm:col-start-4 bx--sm:col-end-5 bx--md:col-start-7 bx--md:col-end-9 bx--lg:col-start-13 bx--lg:col-end-17"></div> | ||
<div class="bx--sm:col-start-3 bx--sm:col-end-5 bx--md:col-start-5 bx--md:col-end-9 bx--lg:col-start-9 bx--lg:col-end-17"></div> | ||
<div class="bx--sm:col-start-2 bx--sm:col-end-5 bx--md:col-start-3 bx--md:col-end-9 bx--lg:col-start-5 bx--lg:col-end-17"></div> | ||
<div class="bx--sm:col-span-4 bx--md:col-span-8 bx--lg:col-span-16"></div> | ||
</div> | ||
</section> | ||
|
||
<section> | ||
<h2>Auto Columns</h2> | ||
<div class="bx--css-grid"> | ||
<div class="bx--col"></div> | ||
<div class="bx--col"></div> | ||
<div class="bx--col"></div> | ||
<div class="bx--col"></div> | ||
<div class="bx--col"></div> | ||
<div class="bx--col"></div> | ||
<div class="bx--col"></div> | ||
<div class="bx--col"></div> | ||
</div> | ||
</section> | ||
</> | ||
); | ||
} |
Oops, something went wrong.