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

center image #141

Open
sgandon opened this issue Mar 15, 2019 · 10 comments
Open

center image #141

sgandon opened this issue Mar 15, 2019 · 10 comments
Labels
wontfix This will not be worked on

Comments

@sgandon
Copy link

sgandon commented Mar 15, 2019

I there a way to center the image on a slide with the new Marpit engine ?
I used to set ![50% center](myimg.png) but both the percentage and position seem to not work anymore.

@yhatt
Copy link
Member

yhatt commented Mar 15, 2019

Both of supports in Marpit have been put off based on early feedback.

About center keyword, I could not decide to support because I think turning inline element <img> into block element implicitly is an unexpected behavior for user.

Nevertheless if you want center keyword, you can tweak style via <style> tag in Markdown.

<style>
img[alt~="center"] {
  display: block;
  margin: 0 auto;
}
</style>

![w:640 center](image.png)

@sgandon
Copy link
Author

sgandon commented Mar 15, 2019

I can get around the percentage limitation and can understand the removal of it but the center keyworkd would be really great.
the tip you gave works really well, thanks.

@sgandon

This comment has been minimized.

@yhatt

This comment has been minimized.

@sgandon

This comment has been minimized.

@fastfading

This comment has been minimized.

@yhatt

This comment has been minimized.

@yhatt yhatt added the wontfix This will not be worked on label Jul 20, 2020
@cryoff

This comment has been minimized.

@andrea-cassioli-maersk

This comment has been minimized.

@marp-team marp-team locked and limited conversation to collaborators Sep 19, 2021
@yhatt
Copy link
Member

yhatt commented May 17, 2024

The latest Firefox 126 is finally supported zoom CSS property. That means that zoom property is available in all major browsers, and we are ready to get back the image scaling by percentage ![50%](xxx.png), the feature from a classic Marp. However, I don't know whether actually do so :p

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants