Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Touch Premium Member BostonMerlin's Avatar
    Join Date
    Aug 2010
    Location
    Boston
    Posts
    523
    Vote Rating
    43
    BostonMerlin is a jewel in the rough BostonMerlin is a jewel in the rough BostonMerlin is a jewel in the rough

      0  

    Default List odd/even css selector problem

    List odd/even css selector problem


    I'm using the following css assigned to a list to create the background-color odd/even effect shown below. In 2.1, notice the rows where 'odd' is not working. Prior to 2.1 it worked.

    I have a feeling the new 'infinite scroll' functionality is resetting the internal index when the items are outside the bounds of the list container.

    Thanks, John

    Code:
    .widgetListItem:nth-child(odd)
    {
        background-color:white;
    }

    list-odd-even-css-prob.PNG

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,642
    Vote Rating
    899
    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


    The list items are transformed via CSS so the odd/even will remain the same index. In SASS, have you tried setting the $list-zebrastripe var to true?
    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.

  3. #3
    Touch Premium Member BostonMerlin's Avatar
    Join Date
    Aug 2010
    Location
    Boston
    Posts
    523
    Vote Rating
    43
    BostonMerlin is a jewel in the rough BostonMerlin is a jewel in the rough BostonMerlin is a jewel in the rough

      0  

    Default


    Thanks, Mitchell. I replaced my custom css with
    $list-zebrastripe and hit the same problem.

    Thanks, John

Thread Participants: 1