Skip to content
This repository was archived by the owner on Sep 26, 2022. It is now read-only.

Commit 316200f

Browse files
docs: fix Grid bleeding into Select docs
Signed-off-by: Florian-Schoenherr <[email protected]>
1 parent 837262a commit 316200f

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div class="grid-example">
2+
<slot />
3+
</div>

packages/docs/src/routes/components/grid.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ related:
88
---
99

1010
<style>
11-
:global(.example .s-col) {
11+
:global(.grid-example .s-col) {
1212
border: thin solid var(--theme-dividers);
1313
}
1414
</style>
1515

16+
<script>
17+
import Wrapper from '../../examples/Grid/_wrapper.svelte'
18+
</script>
19+
1620
# Grid
1721

1822
Svelte Materialify comes with a 12 column grid system built using flexbox. The grid is used to create specific layouts within an application’s content. It contains 5 types of media breakpoints that are used for targeting specific screen sizes or orientations, **xs**, **sm**, **md**, **lg** and **xl**.
@@ -21,7 +25,9 @@ Svelte Materialify comes with a 12 column grid system built using flexbox. The g
2125

2226
The Svelte Materialify grid is heavily inspired by the [Bootstrap Grid](https://getbootstrap.com/docs/4.0/layout/grid/). It is integrated by using a series of containers, rows, and columns to layout and align content.
2327

24-
<Components.Example file="Grid/usage" />
28+
<Wrapper>
29+
<Components.Example file="Grid/usage" />
30+
</Wrapper>
2531

2632
## API
2733

@@ -65,19 +71,27 @@ Breakpoints based props on grid components work in an `andUp` fashion. With this
6571
### Align
6672

6773
Change the vertical alignment of flex items and their parents using the **align** and **align-self** helper classes.
74+
<Wrapper>
6875
<Components.Example file="Grid/align" />
76+
</Wrapper>
6977

7078
### Breakpoint sizing
7179

7280
Columns will automatically take up an equal amount of space within their parent container. This can be modified using the **cols** prop. You can also utilize the **sm**, **md**, **lg**, and **xl** props to further define how the column will be sized in different viewport sizes.
81+
<Wrapper>
7382
<Components.Example file="Grid/breakpoint" />
83+
</Wrapper>
7484

7585
### Offsets
7686

7787
Offsets are useful for compensating for elements that may not be visible yet, or to control the position of content. Just as with breakpoints, you can set an offset for any available sizes. This allows you to fine tune your application layout precisely to your needs.
88+
<Wrapper>
7889
<Components.Example file="Grid/offset" />
90+
</Wrapper>
7991

8092
### Margin Helpers
8193

8294
Using the [auto margin helper utilities](/styles/spacing/) you can force sibling columns away from each other.
95+
<Wrapper>
8396
<Components.Example file="Grid/margin" />
97+
</Wrapper>

0 commit comments

Comments
 (0)