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

Wide tables overrun container and visible under affix sidebar of default template #2024

Closed
dustinsauls opened this issue Sep 2, 2017 · 0 comments
Assignees
Labels
bug A bug to fix customization Site customization, custom styles, headers, footers and layouts template The stock site template
Milestone

Comments

@dustinsauls
Copy link

Using the default template, tables that are wider than their container render underneath the sidebar affix and are unreadable.

Suggest to wrap tables in <div class="table-responsive"></div>

In docfx.json:

function renderTables() {
    $('table').addClass('table table-bordered table-striped table-condensed').wrap('<div class=\"table-responsive\"></div>');
}

This will ensure table is rendered within its container at normal width but not appear under affix and can be scrolled horizontally.

DocFX Version Used: 2.23.1.0

Template used: default

Steps to Reproduce:

Given table:

| column1 | column2 | column3 | column4 | column 5 |
| --- | --- | --- | --- | --- |
| a_long_non-breaking_phrase | another_long_non-breaking_phrase | another_super-long_non-breaking_phrase_like_a_guid | and_yet_another_super-long_non-breaking_run-on_sentence_like_the_way_my_6_year_old_talks_to_me_constantly | if_I_could_just_get_a_break_from_you_kids_for_a_second_I_could_finish_filing_this_issue |

Expected Behavior:

The table is rendered at normal width but the part that extends beyond container is not visible, but can be scrolled horizontally.

Actual Behavior:

The table's text is rendered visible and unreadable underneath the affix sidebar.

@vicancy vicancy added bug A bug to fix template The stock site template customization Site customization, custom styles, headers, footers and layouts labels Sep 4, 2017
@vicancy vicancy self-assigned this Sep 6, 2017
vicancy added a commit that referenced this issue Sep 27, 2017
vicancy added a commit that referenced this issue Sep 28, 2017
* Support responsive tables

#2024

* Update DocfxSeedSiteTest.cs
vwxyzh pushed a commit that referenced this issue Sep 28, 2017
* Support responsive tables

#2024

* Update DocfxSeedSiteTest.cs
@vicancy vicancy added this to the v2.25 milestone Sep 28, 2017
@vicancy vicancy closed this as completed Oct 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug to fix customization Site customization, custom styles, headers, footers and layouts template The stock site template
Projects
None yet
Development

No branches or pull requests

2 participants