-
4 Jul 2012 4:33 PM #1
Building an App : Removal of 'auto' from margin property
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.
-
4 Jul 2012 6:37 PM #2
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.
-
5 Jul 2012 4:56 AM #3Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
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 @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
30 Nov 2012 6:27 AM #4
In 2.1 I found other interesting code
What is the problem with "auto" attribute?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; },
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote