Skip to content

Commit

Permalink
[useblocks#34] fix overlap content in tables with extra class option
Browse files Browse the repository at this point in the history
  • Loading branch information
kreuzberger committed Sep 19, 2022
1 parent aa3d4ec commit 8c81ed4
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
16 changes: 16 additions & 0 deletions demo/lists_tables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -369,3 +369,19 @@ Test to see that tables behave well with nested paragraphs.
| | .{ } | Bit-field concatenation |
+------------+----------+-------------------------+


Tables with non-breakable text
------------------------------

.. list-table::
:widths: 10,80
:class: table-wrap

* - True
- This text could be broken at all whitespaces occuring in the text
* - False
- This is a code block line, normaly could also be broken at all whitespaces in text
* - True
- This_is_a_non_breakable_line_due_to_no_whitespaces_in_text_at_all_which_is_not_readable_without_breaking_it_working_if_you_can_read_THIS


19 changes: 19 additions & 0 deletions demo/sphinx_needs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ Sphinx-Needs objects
:align: center


.. req:: Sphinx-Needs Theme extension support with code examples
:id: REQ_002
:status: done
:tags: sphinx, extension

The ``Sphinx-Needs Theme`` for PDF shall support also code examples or inline codes with long text

This_is_a_non_breakable_line_due_to_no_whitespaces_in_text_at_all_which_is_not_readable_without_breaking_it_working_if_you_can_read_THIS


Sphinx-Needs tables
===================
Expand All @@ -32,6 +41,16 @@ Sphinx-Needs tables
:filter: 'sphinx' in tags
:columns: id, title, status, tags

This is the same table, but with datatables style. This normally adds a scrollbar to tables if extending the normal layout size

.. needtable::
:filter: 'sphinx' in tags
:style: datatables
:class: table-wrap
:colwidths: 10,10,10,10,60
:columns: id, title, status, tags, content


Sphinx-Needs needflow
=====================

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ table.break {
page-break-before: always;
}

table.table-wrap {
table-layout: fixed;
td, th {
overflow-wrap: break-word;
}
}

table.docutils {
width: 100%;
max-width: 100%;
Expand Down

0 comments on commit 8c81ed4

Please sign in to comment.