Opened 6 years ago

Last modified 5 years ago

#10995 confirmed Bug

Color (Foreground) doesn't get applied to span.

Reported by: Nachiket Patel Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version: 3.0
Keywords: Cc:

Description

Color (Foreground) doesn't get applied to span, when span has a class which has color attribute set in CSS. Althoug, it does work for background-color.

Tested on: Mac OS X 10.7+, Chrome many versions (30.0.+)

Working Demo: http://jsfiddle.net/nachiket/44hSH/

  • Using CKEditor 4.2
  • Loads custom configuration

Attachments (1)

stylef.html (7.2 KB) - added by Jakub Ś 6 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 6 years ago by Jakub Ś

Status: newconfirmed
Version: 4.23.0

Problem can be reproduced in all browsers from CKEditor 3.0 in both CKE 3.x and 4.x.

Use the fiddle or the attached sample and below class that should be put in contents.css file.

.colorful {
	background-color: blue;
	color: green;
}

This is strange but when you apply foreground color you get

<span style="color:#ffff00;"><span class="colorful">half</span></span>

and when you apply background color you get

<span class="colorful"><span style="background-color:#FFFF00;">half</span></span>

Because foreground color doesn't get applied inside span with class you get such result.

Changed 6 years ago by Jakub Ś

Attachment: stylef.html added

comment:2 Changed 5 years ago by Piotrek Koszuliński

This is a hardcore version of the general bug that it's important for some styles to be applied in specific order. However, this case is much worse, because the style comes from a class, so we would need to use computed styles (of not yet existing element) to know the order. Some cases may even be impossible to fix at all because of styles conflicts.

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