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

Tables are too wide #82

Open
meyerbaptiste opened this issue Oct 11, 2018 · 2 comments
Open

Tables are too wide #82

meyerbaptiste opened this issue Oct 11, 2018 · 2 comments

Comments

@meyerbaptiste
Copy link
Member

For example: https://api-platform.com/docs/core/events/#the-event-system
capture d ecran 2018-10-11 a 16 08 29

@Fabious
Copy link
Contributor

Fabious commented Jan 2, 2019

I see two ways of fixing this :

  • overflow-x: auto on the container, if a big table exists, user can scroll the whole container. Easy fix, but a bit weird
  • Wrap the <table> with <div style="overflow-x: auto">, a lot better UX wise, but need to see how to add that with the remark html generator from markdown

@Fabious
Copy link
Contributor

Fabious commented Jan 3, 2019

Tried to find a nice solution to this and here's the problems i encounter (Gatsby related) :

gatsby-transformer-remark is used to parse the markdowns files, i don't think there is way to tell it : "hey, if you find a table, just wrap it in a div". No options for that.

I can use String.replace on the output string of this process (in gatsby-node.js), something like :

  • <table> -> <div><table>
  • </table> -> </div></table>

I don't know if it's a good solution tho...

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