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

auto image size not working ? #192

Closed
miguel-negrao opened this issue Sep 20, 2019 · 2 comments
Closed

auto image size not working ? #192

miguel-negrao opened this issue Sep 20, 2019 · 2 comments

Comments

@miguel-negrao
Copy link

Hi

Putting 'auto' in an image (not background image) to get automatic width doesn't seem to work:

---
marp: true
title: Marp CLI example
description: Hosting Marp slide deck on the web
theme: uncover
paginate: true
_paginate: false
---

![auto](https://www.netlify.com/img/press/logos/logomark.svg)

imagem

Is this not the correct way to automatically resize the image ?

Would be nice we could resize the image as percentage of slide width or height also on foreground images.

@yhatt
Copy link
Member

yhatt commented Sep 20, 2019

The "auto" string just means defining "auto" to the alternative text (alt attribute) of image. To use auto keyword correctly, you have to specify which one of width (w) or height (h).

![width:auto](https://www.netlify.com/img/press/logos/logomark.svg)

However, auto keyword in CSS means the original image size of image. Thus, it cannot resize to fill of slide yet.

Percentage value such as width:100% was not supported caused by a special case of in-place DOM update in Firefox (#62). But certainly I think percentage should be enabled in an inline image too.

@miguel-negrao
Copy link
Author

Ok, got it, thanks !

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

No branches or pull requests

2 participants