Results 1 to 4 of 4

Thread: Building an App : Removal of 'auto' from margin property

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    46
    Vote Rating
    8
      0  

    Default Building an App : Removal of 'auto' from margin property

    If I set the margin of a container to 0 auto (to center) and then from the command line, perform a sencha app build package, 'auto' is removed.

    This results in the container being aligned to the left.

  2. #2
    Sencha User
    Join Date
    May 2012
    Posts
    46
    Vote Rating
    8
      0  

    Default

    Also, I've just noticed that if I enter an 'em' figure for the padding property, this get converted to 'px'.

    My new rule of thumb then, is to not use the padding and margin attributes and just use css.

  3. #3
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      0  

    Default

    testing with 2.0.1.1 and 2.0.2 the building of the source doesn't remove the '0 auto' for me, it leaves it alone as it should.

    Since layouts are CSS based, I would do almost everything with CSS, not use style, padding, margin but use cls.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  4. #4
    Sencha User
    Join Date
    Apr 2012
    Posts
    15
    Vote Rating
    1
      0  

    Default

    In 2.1 I found other interesting code
    Code:
    Ext.define('Ext.Component')
    ...........................................
    applyWidth: function(width) {
    return this.filterLengthValue(width);
    },
    ...........................................
    filterLengthValue: function(value) {
    if (value === 'auto' || (!value && value !== 0)) {
    return null;
    }
    return value;
    },
    What is the problem with "auto" attribute?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •