Skip to content

Commit

Permalink
Use rem for image sizing (github#23008)
Browse files Browse the repository at this point in the history
Co-authored-by: Grace Park <gracepark@github.com>
  • Loading branch information
heiskr and gracepark committed Nov 19, 2021
1 parent 13147ad commit e8d6d37
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions stylesheets/images.scss
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
.markdown-body .procedural-image-wrapper {
display: block;
padding: 10px 0;
margin: 20px auto 0 auto;
padding: 1rem 0;
margin: 1rem auto 0 auto;
border: none;
max-width: calc(100% - 32px);
}
max-width: calc(100% - 2rem);

.markdown-body .procedural-image-wrapper img {
width: auto;
height: auto;
max-height: 500px;
padding: 0;
box-shadow: var(--color-shadow-medium);
}
img {
width: auto;
height: auto;
max-height: 32rem;
padding: 0;
box-shadow: var(--color-shadow-medium);
}

// make sure images that contain emoji render at the expected size
.markdown-body img[src*="https://github.githubassets.com/images/icons/emoji"]
{
height: 20px;
width: 20px;
// make sure images that contain emoji render at the expected size
img[src*="https://github.githubassets.com/images/icons/emoji"]
{
height: 20px;
width: 20px;
box-shadow: none;
}
}

.markdown-body img {
max-height: 500px;
max-height: 32rem;
padding: 0;
}

0 comments on commit e8d6d37

Please sign in to comment.