Open pgoussy opened 3 months ago
@pgoussy do the list items contain paragraph tags at all?
@pgoussy do the list items contain paragraph tags at all?
Yes they do! I've added a code snippet to the ticket above.
@pgoussy do the list items contain paragraph tags at all?
Yes they do! I've added a code snippet to the ticket above.
Why on earth JATS required a <list-item>
to contain a <p>
tag is totally beyond me.
TLDR:
This is caused by the paragraph tag being display: block
rather than display: inline
and there being an override to put it to display: inline
that specifically applies to the first child of the list, so that all the rest default to block.
So to discuss at backlog refinement: Why does only the first child have that override?
Also, this seems to be about it all being a .no-list-type
list. Is there a different list class that should have been used because this class is intended to have this behaviour?
Investigation:
Considering this example:
The HTML is identical.
<ul class="list-simple">
<li class="no-list-type">
<span class="jats-list-type"></span>
<p>Yes</p>
</li>
<li class="no-list-type">
<span class="jats-list-type"></span>
<p>No</p>
</li>
</ul>
But the CSS is different, for example the display for "yes" is inline
and the "no" is block
. When overriding this to display: inline;
the problem goes away.
But why would the second one be block?
The block style is coming from the paragraph. But both have paragraph tags.
The first item in the list, has an override from common.css:271
.no-list-type:first-child p {
display: inline;
}
NB. As the override is for the first child, and this is a nested list all with the same class, this also explains why Q1 is unaffected, as it is the first child of the outer list, and so the override has been applied to everything within that child (ie. all children of Q1) even though for its siblings, e.g. Q2, it will only apply to their first child.
Great catch @StephDriver !
Describe the bug I noticed that when list items were assigned custom labels (e.g. "Q1", checkboxes, etc.), only the first item in the list would display the label properly. On all subsequent items, there was an unwanted line break inserted between the label and the actual item text.
Oddly enough, in the example linked/screenshotted below, the first list item contained a nested list, and that entire nested list was properly formatted. In every other item with a nested list, the nested list suffered from the same formatting issue (that is, the first item was correct and every subsequent one had a line break)
Janeway version 1.5.1
To Reproduce Steps to reproduce the behavior:
Expected behavior Label for list item should display to the left of the item text on the same line.
Screenshots
XML from screenshot