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

HTML: (Proposal) Wrap Table nodes in a container element #620

Open
alex-ketch opened this issue Jul 8, 2020 · 0 comments
Open

HTML: (Proposal) Wrap Table nodes in a container element #620

alex-ketch opened this issue Jul 8, 2020 · 0 comments

Comments

@alex-ketch
Copy link
Contributor

Whilst working on styling tables in Thema (stencila/thema#207) I encountered an issue where the contents of the table were getting squished and looking cramped. Adding CSS to prevent line wraps causes the entire page to become as wide as the table.

Ideally I'd like to be able to have the best of both worlds, readable tables with lots of cells and an article without a horizontal overflow.
To do this we need to place the table within two wrapping elements like so:

<div style="overflow: hidden;">
  <div style="overflow: auto;">
    <table style="white-space: nowrap;" itemscope="" itemtype="http://schema.org/Table"></table>
  </div>
</div>

I don't think we need to explicitly include the style declarations from Encoda's side, instead Encode should provide targetable wrapping elements for Thema to do as it pleases.

While this isn't strictly semantic, I think given the likelihood of the encoded articles containing large tables it would be nice to have structure which is easy to style in Thema without having to resort to using the JS helpers.

What do you think @nokome?

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

1 participant