Ticket #5503 (confirmed Bug)

Opened 4 years ago

Last modified 5 months ago

Font-size overlap Background-color

Reported by: garry.yao Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version:
Keywords: IBM Cc: satya_minnekanti@…

Description (last modified by garry.yao) (diff)

Reproducing Procedures

  1. Open any of the sample page, load the document with the following content and selection;
    <p> [some sample] text </p>
    
  2. Apply the 'Background-color' style with 'red' value.
  3. Make the following selection based on the result document.
    <p><span style="background-color: rgb(255, 0, 0);">some [sample</span> text]</p>
    
  4. Apply the 'Font-size' style with value '72pt';
    • Actual Result:
      1. Firefox, IE8 and Safari:
      2. IE6/7:
  • Expected Result:

Attachments

firefox_ie8_safari.png (1.8 KB) - added by garry.yao 4 years ago.
ie6_ie7.png (2.1 KB) - added by garry.yao 4 years ago.
expected.png (2.0 KB) - added by garry.yao 4 years ago.

Change History

Changed 4 years ago by garry.yao

Changed 4 years ago by garry.yao

Changed 4 years ago by garry.yao

comment:1 Changed 4 years ago by garry.yao

  • Description modified (diff)

comment:2 Changed 4 years ago by garry.yao

This's a continuation of bug #3599.

comment:3 Changed 4 years ago by fredck

  • Milestone changed from CKEditor 3.3 to CKEditor 3.x

comment:4 Changed 4 years ago by fredck

  • Milestone CKEditor 3.x deleted

Milestone CKEditor 3.x deleted

comment:5 Changed 3 years ago by satya

  • Cc satya_minnekanti@… added
  • Keywords IBM added

comment:6 Changed 2 years ago by j.swiderski

Tickets #8437, #2675, #8250 and #8181 were marked as duplicates

comment:7 Changed 2 years ago by j.swiderski

From the ticket #8437 you can see that same thing can be reproduced when pasting from Word.


There are couple of solution here:

  1. Since this is correct HTML and it does what it is told, we can tell users to use HTML in such order to get what they want. Not very user friendly
  1. CKEditor could wisely switch spans from
    <span style="background:lime;">
           <span style="color:white;">
               <span style="font-size:36.0pt;">WORD</span>
           </span>
    </span>
    

to (size around background color)

<span style="font-size:36.0pt;">
    <span style="background:teal;">
         <span style="color:white;">ABC</span>
</span>

But what if someone actually wanted something like that- not a good idea.

  1. Perhaps best solution would me merging span tags into one. When one wants to add style new rule would have to be added to span and when one wants to remove certain style, only this style would have to be removed and not whole span.
    There is still problem with bold/underline/italics. By default these are represented by strong/em/u. We can't expect editor to merge put these inside span. Either users should know what to use first and what second (can be described in docs) or devs creating apps with CKEditor should set these styles to use spans instead of default tags so as to get merging effect.

This isn't easy issue and there are many cases to be considered. Some of them have been described: #8045, #7498, #8686.

Last edited 11 months ago by j.swiderski (previous) (diff)

comment:8 Changed 2 years ago by j.swiderski

Just a note - #3599 says that this issue is supposed to be fixed.

comment:9 Changed 11 months ago by j.swiderski

#10478 was marked as duplicate.

comment:10 Changed 9 months ago by j.swiderski

This ticket is in fact part of larger #4505.

comment:11 Changed 5 months ago by j.swiderski

#11100 was marked as duplicate.

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