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 Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,572
    Answers
    540
    Vote Rating
    309
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


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

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi