Skip to content

Commit

Permalink
RTD and DataTables fixed.
Browse files Browse the repository at this point in the history
Fixes #305
  • Loading branch information
danwos committed Oct 8, 2021
1 parent c955561 commit b4091d5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
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

0 comments on commit b4091d5

Please sign in to comment.