PhilCodeEx / base2

Automatically exported from code.google.com/p/base2
0 stars 0 forks source link

jsb.createStyleSheet doesn't handle float in Firefox #130

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The following doesn't create a rule in Firefox.

jsb.createStyleSheet(
  { ".left": { "float": "left" }}
);

See attachment for test case.
Tested in Firefox 3.5 and base2-jsb-fp.js in trunk.

Original issue reported on code.google.com by doek...@gmail.com on 13 Mar 2010 at 3:20

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by dean.edw...@gmail.com on 13 Mar 2010 at 4:01

GoogleCodeExporter commented 8 years ago
Analysis: the call to createStyleSheet results in a call to 
createRule({"float":"left", ".left") inside the file createStyleSheet.js. Then, 
via a forEach.detect and an anonymous function the propertyName "float" is 
translated in Firefox by "propertyName = 
CSSStyleDeclaration.getPropertyName(propertyName);" to the value "css-float" 
and later added to the "rule" (and thus "styleSheet") object. The 
toString-method on the styleSheet object translate the "css-float" property 
name to the string "cssFloat". And that's not a valid CSS property name.

Original comment by doek...@gmail.com on 13 Feb 2011 at 5:42