JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums Menu & Tree Why do i need to set viewEncapsulation to none

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #101613
    shbhmjha784
    Member
    Up
    0
    Down

    I was trying to use a icon for a menu item group, although by default it shows a drop down arrow.
    I tried setting
    .smart-menu-items-group-arrow {
    display: none;
    }
    but it did not effect anything and I could still see the drop down arrow.
    I referred to the example posted (Menu with Icons) and set viewEncapsulation to none and only then the above style was being applied.
    Is there way i can achieve this without setting viewEncapsulation to none as it will leak styles to my parent component?
     

    #101616
    admin
    Keymaster
    Up
    0
    Down

    Hi,
    Where do you add this CSS? Could you provide a full example?
    Best regards,
    Peter Stoev
    Smart UI Team
    https://www.htmlelements.com/

    #101619
    shbhmjha784
    Member
    Up
    0
    Down

    https://www.htmlelements.com/angular/demos/menu/items-layout/
    I was referring to example given in this link, why do we need to set viewEncapsulation as none in the above example app.component.ts

    #101620
    admin
    Keymaster
    Up
    0
    Down

    Hi,
    Where do you add this CSS? Could you provide a full example? If we know, that, we will understand whether viewEncapsulation matters in your application scenario. It is not a requirement to have it. It depends on where CSS styles are imported and how.
    Best regards,
    Peter Stoev
    Smart UI Team
    https://www.htmlelements.com/

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.