Opened 7 years ago

Closed 7 years ago

#9076 closed New Feature (invalid)

When Indentation of parent list is decreased, font styling from sub-lists goes to paragraph and can't be removed.

Reported by: Jakub Ś Owned by:
Priority: Normal Milestone:
Component: Core : Lists Version: 3.0
Keywords: IBM Cc: monahant@…, satya_minnekanti@…

Description

Continuation of #9063

  • Copy the following into the Source view of the editor:
    <ul style="font-size: 10px;">
    	<li>Level 1 - size 10
    		<ul style="font-size: 24px;">
    			<li>Level 2 - size 24</li>
    		</ul>
    	</li>
    	<li>Level 1 - size 10</li>
    </ul>
    
  • Switch to wysiwyg mode and select the entire editor contents.
  • Select 'Decrease Indent' on the toolbar. The margin of both lists will be decreased and the level 1 list will no longer be a list.

The supplied fix [7522] results in the following HTML after the 'Decrease Indent' action:

<p style="font-size: 10px;">
	Level 1 - size 10</p>
<ul style="font-size: 24px;">
	<li>Level 2 - size 24</li>
</ul>
<p style="font-size: 10px;">
	Level 1 - size 10</p>

The problem with this is that the font-size is not reflected in the toolbar for the paragraph elements. Even if the user does change the font size on the paragraph text, the original font-size will still remain on the P element:

<p style="font-size: 10px;">
	<span style="font-size:14px;">Level 1 - size 10</span></p>

Can this font-size be moved into a span tag for the paragraph contents instead when the list is outdented, so that the font-size is reflected on the toolbar? i.e.

<p>
	<span style="font-size:10px;">Level 1 - size 10</span></p>
<ul style="font-size: 24px;">
	<li>Level 2 - size 24</li>
</ul>
<p>
	<span style="font-size:10px;">Level 1 - size 10</span></p>

If this is too complex a change right now, would it be possible to only keep the font-size style for UL and OL elements? i.e.

<p>
	Level 1 - size 10</p>
<ul style="font-size: 24px;">
	<li>Level 2 - size 24</li>
</ul>
<p>
	Level 1 - size 10</p>

Change History (6)

comment:1 Changed 7 years ago by Jakub Ś

Status: newconfirmed

comment:2 Changed 7 years ago by Jakub Ś

Type: BugNew Feature
Version: 3.6.4 (SVN - trunk)3.0

comment:3 Changed 7 years ago by Teresa Monahan

Another drawback of the current approach is that the font-size is preserved even when the user exits out of a list e.g.

  • In the original sample above, place the cursor after the level 2 list item "Level 2 - size 24"
  • Press enter twice to exit out of the level 2 list
  • Type some text

Problem: The text keeps the font-size of the level 2 list, even though it is now part of the level 1 list because the font-size is now specified on the li element:

<ul style="font-size: 10px;">
	<li>Level 1 - size 10
		<ul style="font-size: 24px;">
		     <li>Level 2 - size 24</li>
		</ul>
	</li>
	<li style="font-size: 24px;">Text</li>
	<li>Level 1 - size 10</li>
</ul>

This is also a problem when exiting the lists altogether i.e. place the cursor at the end of the editor contents and press enter twice to exit out of the lists completely. The new p element now also has the font-style set:

<ul style="font-size: 10px;">
	<li>Level 1 - size 10
		<ul style="font-size: 24px;">
			<li>Level 2 - size 24</li>
		</ul>
	</li>
	<li>Level 1 - size 10</li>
</ul>
<p style="font-size: 10px;">
	text</p>

comment:4 Changed 7 years ago by Teresa Monahan

Cc: monahant@… added

comment:5 Changed 7 years ago by Satya Minnekanti

Cc: satya_minnekanti@… added

satya added to cc

comment:6 Changed 7 years ago by Garry Yao

Resolution: invalid
Status: confirmedclosed

The issue on topic is now fixed with [7535] which invalidated this ticket.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy