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

Slides shifted to the right in the webapp #67

Closed
rcalsaverini opened this issue May 11, 2021 · 8 comments
Closed

Slides shifted to the right in the webapp #67

rcalsaverini opened this issue May 11, 2021 · 8 comments

Comments

@rcalsaverini
Copy link

Hello! Great project. I've been using markdown to write beamer slides for years (with pandoc) and this is a really nice addition to that space.

One small issue I've been having is that when I open the web app, my slides seem to be all shifted to the right.

Steps to reproduce

These are the steps I used:

  1. On MacBook pro, open terminal, choose folder, and type npm init slidev and follow all standard options. Wait for all packages to be installed.
  2. Open Google Chrome and navigate to http://localhost:3030.

The slides open like this:
image

image

@rcalsaverini
Copy link
Author

rcalsaverini commented May 11, 2021

I'm not really sure if there's something wrong with my environment or if it is hardware related. I don't really know much about frontend development.

I initially thought the culprit was my external monitor (although it has the same form factor as the MacBook's display) but this happens even with the external monitor disconnected.

The exported PDF is also shifted in the same direction (BTW, the latex is not correctly rendered in the exported PDF).

@antfu
Copy link
Member

antfu commented May 11, 2021

Can't reproduce on my side. Can you check the consoles, and inspect the dom to see what's wrong? Thanks

@kawamataryo
Copy link
Contributor

kawamataryo commented May 11, 2021

I have the same issue.

Reproduction is here.
https://github.com/kawamataryo/slidev-demo

May-12-2021.05-01-23.mp4

I can fix it by removing the "margin: auto" from "#slide-content", but...

@nonlinearcom
Copy link

nonlinearcom commented May 11, 2021

Hi, I think it can be solved by removing the width of "slide-content" :
<div id="slide-content" style="height: 551.25px; width: 980px; transform: translate(-50%, -50%) scale(0.694785);">

@antfu
Copy link
Member

antfu commented May 11, 2021

I can fix it by removing the "margin: auto" from "#slide-content", but...

Sorry but what? 😂

Looks like it's redundant, and we could remove it and push a fix

@antfu antfu closed this as completed in bd2e0c0 May 11, 2021
@antfu
Copy link
Member

antfu commented May 11, 2021

Released in 0.7.4. Would be appreciated if you can help verify if it works.

@kawamataryo
Copy link
Contributor

kawamataryo commented May 11, 2021

Thanks. It has been fixed.

@rcalsaverini
Copy link
Author

Thanks @antfu! It's 100% fixed on my setup, and working on different screens and resolutions.

antfu pushed a commit that referenced this issue Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants