Bug 102301 - After export to HTML, bullet lists lose indentation and alignment
Summary: After export to HTML, bullet lists lose indentation and alignment
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.4.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-19 23:45 UTC by Leif Arne Storset
Modified: 2016-10-09 18:38 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
ODT file with bullet points (12.90 KB, application/vnd.oasis.opendocument.text)
2016-09-19 23:45 UTC, Leif Arne Storset
Details
HTML file with ugly bullets (3.53 KB, text/html)
2016-09-19 23:46 UTC, Leif Arne Storset
Details
Demonstration of nicer-looking bullets in HTML (894 bytes, text/html)
2016-09-19 23:46 UTC, Leif Arne Storset
Details

Note You need to log in before you can comment on or make changes to this bug.
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.