Hi,

With this code the margin works but the padding is not being applied.

It this expected or is it a bug?

<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
               xmlns:js="library://ns.apache.org/flexjs/basic">
   <js:valuesImpl>
       <js:SimpleCSSValuesImpl/>
   </js:valuesImpl>

   <js:initialView>
       <js:View width="100" height="100">
           <js:style>
               <js:SimpleCSSStyles padding="20" margin="50" 
backgroundColor="red" />
           </js:style>
           <js:Label text="Hello" />
       </js:View>
   </js:initialView>
</js:Application>

The box expands to include the padding ie it 140x140 rather than 100x100 but 
the div around the span containing the text is not positioned correctly. It’s 
at 0,0 when it should be at 20,20.

Here’s the generated HTML:
<div class="flexjs" style="display: block; position: relative; width: 100px; 
height: 100px; padding: 20px; margin: 50px; background-color: rgb(255, 0, 
0);"><div style="display: block; position: absolute; left: 0px; top: 0px; 
width: 100px; height: 100px;"><span class="Label" style="white-space: nowrap; 
cursor: default; pointer-events: none; display: block;">Hello</span></div></div>

Thanks,
Justin

Reply via email to