Bug 102301

Summary: After export to HTML, bullet lists lose indentation and alignment
Product: LibreOffice Reporter: Leif Arne Storset <leifarne>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED NOTABUG    
Severity: normal CC: vsfoote
Priority: medium    
Version: 5.1.4.2 release   
Hardware: All   
OS: Linux (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: ODT file with bullet points
HTML file with ugly bullets
Demonstration of nicer-looking bullets in HTML

Description Leif Arne Storset 2016-09-19 23:45:54 UTC
Created attachment 127444 [details]
ODT file with bullet points

To reproduce:

1. Create a Writer document.
2. Press Shift+F12 to start a bullet list.
3. Type some list items, one of them long enough to cause the line to wrap.
4. Export to HTML.

Or load the attached ODT and export it.

Expected:

The bullets look pretty. :) Specifically:

- There is some space between the left margin, the bullet and the text.
- When the text in a list item wraps, the second line should line up with the
  first line. Something like this ASCII text does.

One way of achieving this would be to use the default stylesheet for HTML used
automatically by all browsers. Or, use one of the default list marker types, or
a custom 'list-style-image'.

See also the attached "bullet-better.html".

Actual:

- The bullet is exactly aligned with the left margin. It is nearly touching the
  text of the list item.
- Wrapped lines line up with the left margin and the bullet.

This happens because the stylesheet sets margin and padding to zero, which
removes the browser's default indentation:

    ol, ul { margin:0; padding:0;}

and also removes the default list-item marker:

    li { list-style: none; margin:0; padding:0;}

See the attached "bullets.html".
Comment 1 Leif Arne Storset 2016-09-19 23:46:32 UTC
Created attachment 127445 [details]
HTML file with ugly bullets
Comment 2 Leif Arne Storset 2016-09-19 23:46:59 UTC
Created attachment 127446 [details]
Demonstration of nicer-looking bullets in HTML
Comment 3 V Stuart Foote 2016-09-20 20:13:10 UTC
No, do not filter export to XHTML, rather use the save-as HTML. Preferred HTML formatting is maintained for WYSIWYG behavior.

Or if you do filter export to XHTML, you can simply edit (in a text editor) the embedded CSS
Comment 4 Leif Arne Storset 2016-10-09 18:38:41 UTC
Thanks, using Save as HTML works much better.