Skip to content

Comments

Corrects image aspect ratio#575

Open
S0AndS0 wants to merge 2 commits intojekyll:masterfrom
S0AndS0:img-aspect-ratio
Open

Corrects image aspect ratio#575
S0AndS0 wants to merge 2 commits intojekyll:masterfrom
S0AndS0:img-aspect-ratio

Conversation

@S0AndS0
Copy link

@S0AndS0 S0AndS0 commented Feb 19, 2021

Edits _sass/minima/_base.scss

Setting CSS of max-width: 100%; may be combined with height: auto;
which causes image height to shrink if view-port is less than image width.

Note, this may require that image HTML attributes for height
and width be defined, eg...

<img alt-text="Place holder image of a cat"
     width="700"
     height="500"
     src="https://placekitten.com/700/500" />

**Edits** `_sass/minima/_base.scss`

Setting CSS of `max-width: 100%;` may be combined with `height: auto;`
which causes image height to shrink if view-port is less than image width.

Note, this may require that image HTML attributes for height
and width be defined, eg...

```html
<img alt-text="Place holder image of a cat"
     width="700"
     height="500"
     src="https://placekitten.com/700/500" />
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants