1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    1
    Vote Rating
    0
    sy890622 is on a distinguished road

      0  

    Default Unanswered: Control styles totally in external css file?

    Unanswered: Control styles totally in external css file?


    Is there a best practice to apply styles in css file?
    I have tried to customize a button in css, but the code is really arbitrary, the style is always not the way I want to, so I have to size the button in js code.
    Also some layout control, e.g. width, height properties. It just doesn't work what I want.
    Some thing happens at 'layout' process, that the extjs framework calculate absolute size for me at runtime, and at most time it overrides my css style.
    I want to write a component in js, and styles it in css, don't u think it is a very common idea?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,206
    Answers
    3517
    Vote Rating
    856
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    For layouts, they will many times have to calculate the sizes for items so then things need to be in JS for that to really happen. Otherwise things would have to be rendered and then be resized which does not perform very well especially on IE.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread