2

I am using ngb-accordions in my angular4 app. One accordion should always be opened. My only problem is that I am not able to remove the underline on hovering. Here is my html-code:

<template ngbPanelTitle>
    <span class="no-hover-and-no-cursor-effect">Version</span>
</template>

and this is my css-code:

.no-hover-and-no-cursor-effect:hover {
  cursor: default;
  color: #0275d8;
  text-decoration: none;
}

the color works, it stays the same. The cursor also works, but the title is still underlined...

Philipp Januskovecz
  • 868
  • 5
  • 14
  • 25

1 Answers1

0

My app is also Angular. The following approach works for me by updating the component's SCSS file:

// overwrite ngb-accordion default ngbPanelTitle styles
:host ::ng-deep {
    .accordion {
        .btn-link {
            color: #666666;
            &:hover,
            &:focus,
            &.focus {
                text-decoration: none;
            }
        }
    }
}
wcb1
  • 665
  • 1
  • 7
  • 6