Skip to content

Commit 3781e79

Browse files
authored
Add utility and examples
1 parent 42997a4 commit 3781e79

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

docs/content/utilities/typography.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ Change the font weight, styles, and alignment with these utilities.
106106
<p class="text-mono">Monospace</p>
107107
<p class="user-select-none">User Select None</p>
108108
<p class="text-capitalize">capitalize</p>
109+
<p class="text-tabular-nums">Tabular numbers 111</p>
109110
```
110111

111112
## Word-break

docs/src/stories/utilities/Typography.stories.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export const TypographicStyles = ({}) => (
7070
<p class="text-mono">Monospace</p>
7171
<p class="user-select-none">User Select None</p>
7272
<p class="text-capitalize">capitalize</p>
73+
<p class="text-tabular-nums">Tabular numbers 111</p>
7374
</div>
7475
)
7576

src/utilities/typography.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,3 +330,8 @@
330330
.text-capitalize {
331331
text-transform: capitalize !important;
332332
}
333+
334+
/* Use alternate glyphs for numbers of equal width (when font supports it) */
335+
.text-tabular-nums {
336+
font-variant-numeric: tabular-nums !important;
337+
}

0 commit comments

Comments
 (0)