Results 1 to 2 of 2

Thread: Control styles totally in external css file?

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    1
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3931
    Vote Rating
    1272
      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 @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

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
  •