Results 1 to 3 of 3

Thread: Styling UI

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    21
    Answers
    1
    Vote Rating
    0
      0  

    Default Answered: Styling UI

    Hi there,

    Whenever I try to custom style UI, using 'style' member, ST2 somehow loses information about first items in CSS block.

    Given example (CoffeeScript):

    Code:
        Ext.Viewport.add
          xtype: 'panel'
          scrollable: true
          fullscreen: true
    
          defaults:
            style: """
                    div.red
                    {
                      bugfix_placeholder: 0;
                      color: red;
                      display: inline-block;
                    }
    
                    div.yellow
                    {
                      bugfix_placeholder: 0;
                      color: yellow;
                      display: inline-block;
                    }
    
                    div.green
                    {
                      bugfix_placeholder: 0;
                      color: green;
                      display: inline-block;
                    }
                    """
            #styleHtmlContent: true
    
          items: [
            {
            html : "<div class='yellow'>aaa</div>"
            },
            {
            html : "<div class='red'>bbb</div>"
            },
            {
            html : "<div class='yellow'>ccc</div>"
            },
            {
            html : "ddd"
            },
          ]
    1) 'bugfix_placeholder: 0' has been added to each CSS block definition as a first item. This lets consequent items in block be correctly processed.
    2) all elements (incl. 'ddd') are green.

    Is this just me or bugs in ST2?

  2. The style config doesn't take CSS, it takes rules.

  3. #2
    Sencha - Community Support Team mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,023
    Answers
    3976
    Vote Rating
    1364
      0  

    Default

    The style config doesn't take CSS, it takes rules.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    21
    Answers
    1
    Vote Rating
    0
      0  

    Default

    Thanks for info!

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
  •