Skip to content

Commit 9262814

Browse files
authored
Merge pull request #474 from primer/task/add-text-mono-util
Add text-mono utility class
2 parents 5657a4f + 6c3c4f9 commit 9262814

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

modules/primer-utilities/docs/typography.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ Change the font weight, styles, and alignment with these utilities.
9393
<p class="text-emphasized">Emphasized</p>
9494
<p class="text-small">Small</p>
9595
<p class="lead">Bacon ipsum dolor amet tri-tip chicken kielbasa, cow swine beef corned beef ground round prosciutto hamburger porchetta sausage alcatra tail.</p>
96+
<p class="text-mono">Monospace</p>
9697
```
9798

9899
## Text alignment

modules/primer-utilities/lib/typography.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,3 +214,8 @@
214214
.text-shadow-light {
215215
text-shadow: 0 1px 0 rgba($white, 0.5);
216216
}
217+
218+
/* Set to monospace font */
219+
.text-mono {
220+
font-family: $mono-font;
221+
}

modules/primer-utilities/stories/Typography.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ storiesOf('Typography utilities', module)
5757
<p className='text-emphasized'>text-emphasized</p>
5858
<p className='text-small'>text-small</p>
5959
<p className='lead'>lead</p>
60+
<p className='text-mono'>text-mono</p>
6061
</div>
6162
))
6263
.add('text alignment', () => (

0 commit comments

Comments
 (0)