1. #1
    Sencha User voodoov's Avatar
    Join Date
    Mar 2012
    Posts
    34
    Answers
    1
    Vote Rating
    0
    voodoov is on a distinguished road

      0  

    Default Unanswered: Javascript Style vs. CSS Style (Best Practice)

    Unanswered: Javascript Style vs. CSS Style (Best Practice)


    Hi,

    In large applications, is it better to write custom css in JS file or CSS file?
    Which one has better performance?

    Javascript Style:
    Code:
    {
      xtype: 'label',
      html: 'Some Text',
      style: {
        fontWeight: 'bold',
        display: 'block',
        float: 'left',
        margin: '2'
      }
    }
    or

    CSS Style:
    Code:
    {
       xtype: 'label',
       html: 'Some Text',
       cls: 'myStyle'
    }
    -------------------
    .myStyle {
      font-weight: bold;
      display: block;
      float: left;
      margin: 2px;
     }
    Thank you in advance.

  2. #2
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,344
    Answers
    498
    Vote Rating
    249
    skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of

      0  

    Default


    I doubt there's a measurable performance difference. Where possible I would favour the separate CSS file approach.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar