Skip to content

Commit

Permalink
Merge pull request #456 from primer/height_fit
Browse files Browse the repository at this point in the history
Adding height-fit utility class
  • Loading branch information
jonrohan authored Mar 14, 2018
2 parents bc7a067 + fb0fcf1 commit 11406f8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions modules/primer-utilities/docs/layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@ Use `.width-full` to set width to 100%.
</div>
```

Use `.height-fit` to set max-height 100%.

```html
<div class="one-fourth column" style="height: 100px; overflow: auto;">
<div class="p-3 height-fit border">
Bacon ipsum dolor amet meatball flank beef tail pig boudin ham hock chicken capicola. Shoulder ham spare ribs turducken pork tongue. Bresaola corned beef sausage jowl ribeye kielbasa tenderloin andouille leberkas tongue. Ribeye tri-tip tenderloin pig, chuck ground round chicken tongue corned beef biltong.
</div>
</div>
```

Use `.height-full` to set height to 100%.

```html
Expand Down
2 changes: 2 additions & 0 deletions modules/primer-utilities/lib/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@
.width-fit { max-width: 100% !important; }
/* Set the width to 100% */
.width-full { width: 100% !important; }
/* Max height 100% */
.height-fit { max-height: 100% !important; }
/* Set the height to 100% */
.height-full { height: 100% !important; }

Expand Down

0 comments on commit 11406f8

Please sign in to comment.