﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
8656	When font_style and fontSize_style are using element:div, changing font size overwrites font style and vice versa	adsharp		"I have the following configuration:

{{{#!js
config.font_style = {
  element    : 'div',
  styles   : { 'font-family' : '#(family)' },
  overrides  : [ { element : 'font', attributes : { 'face' : null } } ]
};
config.fontSize_style = {
  element    : 'div',
  styles   : { 'font-size' : '#(size)' },
  overrides  : [ { element : 'font', attributes : { 'size' : null } } ]
};
}}}

Where the default `element` for each is:
{{{#!js
element    : 'span',
}}}

When the default `span` is used, font size and font family peacefully coexist. But when both are using `div` elements, changing the font size overwrites the font family div, and vice versa. Put another way, the formatting div can only have EITHER `font-family` or `font-size` styles in its style attribute.

----

When I set the font on a paragraph I get something like this:
{{{#!text/html
<div style=""font-family:arial,helvetica,sans-serif;"">Hello.</div>
}}}

I then set the font and get this:
{{{#!text/html
<div style=""font-size:12px;"">Hello.</div>
}}}
This is what I expected:
{{{#!text/html
<div style=""font-family:arial,helvetica,sans-serif; font-size:12px;"">Hello.</div>
}}}

----

To be clear, this works as expected when the `element` is set to `span` for both. However it seems to achieve this by using two nested `span` elements, not by modifying the style attribute:
{{{#!text/html
<span style=""font-size:12px;""><span style=""font-family: arial,helvetica,sans-serif;"">Hello.</span></span>
}}}

I don't know if this would work for the `div` element.

I have tested this in Firefox and Safari under Mac OS X."	Bug	closed	Normal		Core : Styles	3.6.2	invalid		adam.sharp@…
