You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Justin Mclean (JIRA)" <ji...@apache.org> on 2017/02/19 23:27:44 UTC
[jira] [Created] (FLEX-35274) [FlexJS] Container padding doesn't
work as expected
Justin Mclean created FLEX-35274:
------------------------------------
Summary: [FlexJS] Container padding doesn't work as expected
Key: FLEX-35274
URL: https://issues.apache.org/jira/browse/FLEX-35274
Project: Apache Flex
Issue Type: Bug
Components: FlexJS
Reporter: Justin Mclean
When this code is run the margin works but the padding is not being applied.
{code}
<?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>
{code}
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:
{code}
<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>
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)