Skip to content

Commit 31a5afd

Browse files
committed
update gap and margin
1 parent 675468a commit 31a5afd

2 files changed

Lines changed: 32 additions & 24 deletions

File tree

site/src/content/docs/utilities/gap.mdx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { getData } from '@libs/data'
1313

1414
## Overview
1515

16-
Use gap utilities to control the space between children in flexbox and grid layouts. Gap utilities are built from a default Sass map ranging from `.25rem` to `3rem`. Use utilities like `.gap-3` and `.gap-5` to control the gap between all children:
16+
Use gap utilities to control the space between children in flexbox and grid layouts. Gap utilities are built from a default Sass map ranging from `0` to `3rem` (`.gap-0` through `.gap-9`). Use utilities like `.gap-3` and `.gap-5` to control the gap between all children:
1717

1818
<Example class="d-flex align-items-center justify-content-center gap-4 text-center" showMarkup={false} code={`
1919
<div class="d-flex gap-3 p-3 bd-pattern-diagonal rounded-3">
@@ -51,9 +51,13 @@ Where *size* is one of:
5151
- `0` - for classes that eliminate the `gap` by setting it to `0`
5252
- `1` - (by default) for classes that set the `gap` to `$spacer * .25`
5353
- `2` - (by default) for classes that set the `gap` to `$spacer * .5`
54-
- `3` - (by default) for classes that set the `gap` to `$spacer`
55-
- `4` - (by default) for classes that set the `gap` to `$spacer * 1.5`
56-
- `5` - (by default) for classes that set the `gap` to `$spacer * 3`
54+
- `3` - (by default) for classes that set the `gap` to `$spacer * .75`
55+
- `4` - (by default) for classes that set the `gap` to `$spacer`
56+
- `5` - (by default) for classes that set the `gap` to `$spacer * 1.25`
57+
- `6` - (by default) for classes that set the `gap` to `$spacer * 1.5`
58+
- `7` - (by default) for classes that set the `gap` to `$spacer * 2`
59+
- `8` - (by default) for classes that set the `gap` to `$spacer * 2.5`
60+
- `9` - (by default) for classes that set the `gap` to `$spacer * 3`
5761

5862
(You can add more sizes by adding entries to the `$spacers` Sass map variable.)
5963

@@ -154,23 +158,23 @@ All gap utilities are responsive and include all breakpoints.
154158
<ul>
155159
{getData('breakpoints').map((breakpoint) => {
156160
return (
157-
<li><code>.{breakpoint.abbr}gap-0</code> through <code>.{breakpoint.abbr}gap-5</code></li>
161+
<li><code>.{breakpoint.abbr}gap-0</code> through <code>.{breakpoint.abbr}gap-9</code></li>
158162
)
159163
})}
160164
</ul>
161165

162166
<ul>
163167
{getData('breakpoints').map((breakpoint) => {
164168
return (
165-
<li><code>.{breakpoint.abbr}row-gap-0</code> through <code>.{breakpoint.abbr}row-gap-5</code></li>
169+
<li><code>.{breakpoint.abbr}row-gap-0</code> through <code>.{breakpoint.abbr}row-gap-9</code></li>
166170
)
167171
})}
168172
</ul>
169173

170174
<ul>
171175
{getData('breakpoints').map((breakpoint) => {
172176
return (
173-
<li><code>.{breakpoint.abbr}column-gap-0</code> through <code>.{breakpoint.abbr}column-gap-5</code></li>
177+
<li><code>.{breakpoint.abbr}column-gap-0</code> through <code>.{breakpoint.abbr}column-gap-9</code></li>
174178
)
175179
})}
176180
</ul>

site/src/content/docs/utilities/padding.mdx

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { getData } from '@libs/data'
1717

1818
## Overview
1919

20-
Use padding utilities to control the inner space within elements. Padding utilities are built from a default Sass map ranging from `.25rem` to `3rem`. Use utilities like `.p-3` and `.p-5` to control the padding on all sides of an element:
20+
Use padding utilities to control the inner space within elements. Padding utilities are built from a default Sass map ranging from `0` to `3rem` (`.p-0` through `.p-9`). Use utilities like `.p-3` and `.p-5` to control the padding on all sides of an element:
2121

2222
<Example class="d-flex align-items-center justify-content-center gap-4 text-center" showMarkup={false} code={`
2323
<div class="p-3 bg-primary bd-pattern-diagonal-inner fg-contrast-accent rounded-3">
@@ -48,22 +48,26 @@ Where *property* is:
4848

4949
Where *sides* is one of:
5050

51-
- `t` - for classes that set `padding-top`
52-
- `b` - for classes that set `padding-bottom`
53-
- `s` - (start) for classes that set `padding-left` in LTR, `padding-right` in RTL
54-
- `e` - (end) for classes that set `padding-right` in LTR, `padding-left` in RTL
55-
- `x` - for classes that set both `*-left` and `*-right`
56-
- `y` - for classes that set both `*-top` and `*-bottom`
51+
- `t` - for classes that set `padding-block-start`
52+
- `b` - for classes that set `padding-block-end`
53+
- `s` - (start) for classes that set `padding-inline-start`
54+
- `e` - (end) for classes that set `padding-inline-end`
55+
- `x` - for classes that set `padding-inline`
56+
- `y` - for classes that set `padding-block`
5757
- blank - for classes that set a `padding` on all 4 sides of the element
5858

5959
Where *size* is one of:
6060

6161
- `0` - for classes that eliminate the `padding` by setting it to `0`
6262
- `1` - (by default) for classes that set the `padding` to `$spacer * .25`
6363
- `2` - (by default) for classes that set the `padding` to `$spacer * .5`
64-
- `3` - (by default) for classes that set the `padding` to `$spacer`
65-
- `4` - (by default) for classes that set the `padding` to `$spacer * 1.5`
66-
- `5` - (by default) for classes that set the `padding` to `$spacer * 3`
64+
- `3` - (by default) for classes that set the `padding` to `$spacer * .75`
65+
- `4` - (by default) for classes that set the `padding` to `$spacer`
66+
- `5` - (by default) for classes that set the `padding` to `$spacer * 1.25`
67+
- `6` - (by default) for classes that set the `padding` to `$spacer * 1.5`
68+
- `7` - (by default) for classes that set the `padding` to `$spacer * 2`
69+
- `8` - (by default) for classes that set the `padding` to `$spacer * 2.5`
70+
- `9` - (by default) for classes that set the `padding` to `$spacer * 3`
6771

6872
(You can add more sizes by adding entries to the `$spacers` Sass map variable.)
6973

@@ -151,7 +155,7 @@ All padding utilities are responsive and include all breakpoints.
151155
<ul>
152156
{getData('breakpoints').map((breakpoint) => {
153157
return (
154-
<li><code>.{breakpoint.abbr}p-0</code> through <code>.{breakpoint.abbr}p-5</code></li>
158+
<li><code>.{breakpoint.abbr}p-0</code> through <code>.{breakpoint.abbr}p-9</code></li>
155159
)
156160
})}
157161
</ul>
@@ -171,37 +175,37 @@ Padding utilities are declared in our utilities API in `scss/_utilities.scss`. [
171175
),
172176
"padding-x": (
173177
responsive: true,
174-
property: padding-right padding-left,
178+
property: padding-inline,
175179
class: px,
176180
values: $spacers
177181
),
178182
"padding-y": (
179183
responsive: true,
180-
property: padding-top padding-bottom,
184+
property: padding-block,
181185
class: py,
182186
values: $spacers
183187
),
184188
"padding-top": (
185189
responsive: true,
186-
property: padding-top,
190+
property: padding-block-start,
187191
class: pt,
188192
values: $spacers
189193
),
190194
"padding-end": (
191195
responsive: true,
192-
property: padding-right,
196+
property: padding-inline-end,
193197
class: pe,
194198
values: $spacers
195199
),
196200
"padding-bottom": (
197201
responsive: true,
198-
property: padding-bottom,
202+
property: padding-block-end,
199203
class: pb,
200204
values: $spacers
201205
),
202206
"padding-start": (
203207
responsive: true,
204-
property: padding-left,
208+
property: padding-inline-start,
205209
class: ps,
206210
values: $spacers
207211
),

0 commit comments

Comments
 (0)