Skip to main content

Child selectors in custom CSS

Comments

5 comments

  • Alex

    Hi,

    try adding a custom class to each item and use child selectors only for your custom class, not for Brizy classes.

    0
  • Daniel Klotz

    Hey Alex,

    thanks for your reply.

    Well yes, but this is not always possible for certain DOM elements due to the nested markup that brizy generates.

    So this is not really a helping workaround.

    Can you confirm this bug?

    1
  • Alex

    Hi,

    Not sure it's a bug. I will open an internal issue and we will do some tests with devs. If it turns out to be a bug, we will fix this.

     
    0
  • A G

    But it also looks like :after selectors don't even work at all....

    0
  • Denis B

    Hi,

    I have tested code you tried to use and this works: View screenshot. The problem is that you used "last-child" pseudo element for the wrong class. You can try to use this code:

    .brz-menu__ul > .brz-menu__item > a:after {
    padding-left: 20px;
    content: " | ";
    }

    .brz-menu__ul > .brz-menu__item:last-child > a:after {
    content: " ";
    }

    Best regards,
    Denis.

    0

Please sign in to leave a comment.