Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add .user-select-none utility class #549

Merged
merged 3 commits into from
Jul 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/primer-utilities/docs/typography.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ Change the font weight, styles, and alignment with these utilities.
<p class="text-small">Small</p>
<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>
<p class="text-mono">Monospace</p>
<p class="user-select-none">User Select None</p>
```

## Text alignment
Expand Down
5 changes: 5 additions & 0 deletions modules/primer-utilities/lib/typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,8 @@
.text-mono {
font-family: $mono-font;
}

/* Disallow user from selecting text */
.user-select-none {
user-select: none !important;
}
1 change: 1 addition & 0 deletions modules/primer-utilities/stories/Typography.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ storiesOf('Typography utilities', module)
<p className='text-small'>text-small</p>
<p className='lead'>lead</p>
<p className='text-mono'>text-mono</p>
<p className='user-select-none'>user-select-none</p>
</div>
))
.add('text alignment', () => (
Expand Down