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

RTD and DataTables fixed. #385

Merged
merged 1 commit into from
Oct 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ License
(`#317 <https://github.com/useblocks/sphinxcontrib-needs/issues/317>`_)
* Improvement: API to register warnings
(`#343 <https://github.com/useblocks/sphinxcontrib-needs/issues/343>`_)
* Bugfix: Scrolling tables improved and ReadTheDocs Tables fixed
(`#305 <https://github.com/useblocks/sphinxcontrib-needs/issues/305>`_)
* Bugfix: :ref:`needtable` need parts 'id' column is not linked
(`#336 <https://github.com/useblocks/sphinxcontrib-needs/issues/336>`_)
* Bugfix: :ref:`needtable` need parts 'incoming' column is empty
Expand Down
14 changes: 12 additions & 2 deletions sphinxcontrib/needs/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ table.need td {
white-space: normal;
}

table.NEEDS_TABLE {
table.NEEDS_TABLE, table.NEEDS_DATATABLES {
display: block;
overflow-x: auto;
white-space: nowrap;
white-space: normal;
width: 100%;
max-width: -moz-fit-content;
max-width: fit-content;
Expand Down Expand Up @@ -102,6 +102,11 @@ div.dataTables_length {
margin-bottom: 10px;
}

div.dataTables_wrapper{
overflow-x: auto;
padding: 0px 5px; /*Space needed for table borders */
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
padding: 0.15em 0.75em;
background: none;
Expand Down Expand Up @@ -133,6 +138,11 @@ div.dt-buttons button {
background-image: none;
}

/* Cares about setting the final bottom border */
table.rtd-exclude-wy-table {
border: 1px solid #e1e4e5 !important;
}

/* Style for external need links*/
a.external_link:after {
content: "🡽"
Expand Down
2 changes: 1 addition & 1 deletion sphinxcontrib/needs/libs/html/datatables_loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ $(document).ready(function() {
$('table.NEEDS_DATATABLES').DataTable( {
dom: 'lBfrtip',
colReorder: true,
scrollX: true,
scrollX: false,
autoWidth: false,
buttons: [
{
Expand Down