flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Mclean (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLEX-35274) [FlexJS] Container padding doesn't work as expected
Date Sun, 19 Feb 2017 23:27:44 GMT
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.

<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

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

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:

This message was sent by Atlassian JIRA

View raw message