Switching the icon design for primeNG's p-panel

In my project, I have implemented a toggleable p-panel. The panel has a button to expand or collapse it, but when clicked, the icon on this button gets selected.

Initially, I disabled this property for buttons using css:

 button:focus {
    outline: none;
    box-shadow: none;
}

Now, I am trying to disable this property for the icons of the panel as well. After reading about ng-deep, I attempted the following code snippet:

::ng-deep .p-panel .p-panel-titlebar-toggler {
    outline: none;
    box-shadow: none;
}

However, this approach did not work as expected. If anyone has any suggestions or solutions, please feel free to share them.

Edit: Here is the HTML snippet used for creating the panel:

<p-panel [toggleable]="true" [toggler]="'header'" [(collapsed)]="panelFuncionalidades" >
    <ng-template pTemplate="header">
        Panel de funcionalidades
    </ng-template>
    Here are some buttons and content inside the panel.
</p-panel>

The variable `panelFuncionalidades` is a boolean used to control the opening and closing of the panel from other parts of the application.

I am looking to remove the circle that appears around the "expand" or "collapse" buttons when they are clicked, similar to what is shown in this image https://i.sstatic.net/OLKhq.png. Although this circle disappears when clicking outside of it, I want to prevent it from appearing altogether.

Answer №1

Include the CSS code snippet in your styles.css document

.p-box .p-box-header .p-box-header-icon:focus {
  box-shadow: none !important;
}

Here is the functional stackblitz URL

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Safari iOS does not display any background for Buttons

Encountering an unusual problem with buttons on iOS devices specifically in Safari browser - the background color isn't being applied like it is on Desktop and Android devices. Here are the CSS properties for the button: export const Button = styled.b ...

Is it possible to modify the shrinking behavior of Flexbox?

My goal is to mimic the layout of a specific webpage using flexbox in my version. However, I've noticed that my version, utilizing flexbox, adjusts to smaller screen sizes differently than the original. The original layout I'm trying to replicate ...

Set boundaries for square dimensions and placement within the parent container

Struggling to confine a square within specific size constraints while keeping it neatly aligned within the parent container. Balancing these requirements has proven challenging. The layout consists of a main div with two columns on the left and a div occu ...

Troubleshooting: Datepicker not appearing in Bootstrap

Here is the detailed markup for the datepicker component: <div class="form-group row"> <div class="col-xs-3 col-md-offset-9"> <label class="control-label">Pick Date</label> <div class="input-group date" id="dp3" data-d ...

What's the best way to ensure a div's height and width are equal when implementing responsive design?

I am currently working on a responsive design and facing challenges in making div's height and width equal. Initially, I set the div's width as a percentage and height as auto, but this caused the divs to not display properly. To resolve this iss ...

Enable wp_star_rating for display on the front end

My goal is to incorporate the wp_star_rating function into a shortcode for use on the frontend of my WordPress website. To achieve this, I have copied the code from wp-admin/includes/template.php to wp-content/themes/hemingway/functions.php. I have includ ...

Managing copious amounts of data in an Angular project using a Restful API

After developing my own Restful API within a Laravel project, I am faced with the challenge of efficiently managing large amounts of data returned by the API in order to display it on an Angular front-end project. For instance, when using the GET method t ...

Experiencing a typeerror with the Event attribute

I encountered an issue while trying to target an event. Here is what I attempted: public gotoPage(event: Event): void { const gettest = (event.target as HTMLElement)?.getAttribute('href'); if (href) { const testModule = "valu ...

Assigning a height of 100% to a div element results in the appearance of

In a div within the body, there are only 3 lines of text. The background color was only filling up to those 3 lines of text. To make the color fill up the entire vertical space of the browser, I adjusted the CSS height properties of html & body to be ...

Combining conditions and CSS classes within the ngClass directive in Angular

Is it possible to combine a condition and a class within the same "ngClass" in Angular? [ngClass]="{cssclass1 : object.cssclass1status , object.cssclass2}" The condition (bold) and CSS class (italic) can be used together. Previously, I have implemented t ...

Fetch information from the themoviedb API

My goal is to retrieve all movies from the themoviedb API, and I attempted to do so by using the popular movies option. The default setting returns 20 movies per page. Below is the route I created for fetching popular movies: /* GET movies listing. */ r ...

Comparison: CSS3 versus Angular Material CSS

My ul and li design in CSS is functioning perfectly on Bootstrap. However, when I apply the same code to an Angular Material project, the Angular Material CSS seems to be overriding my styles. CSS Code: li { width: 2em; height: 2em; text-alig ...

Creating dynamic arrays in Angular2 is essential for flexible and scalable programming

I am facing a challenge in Angular 2 where I need to initialize Array variables from another Array. Here is the scenario: Upon loading my page, I receive an Array of strings from the server (let's call it initialArray). I want to create and initialize ...

Evaluating the functionality of a pipeline that relies on various services

There is a custom pipe in my Angular application that sanitizes HTML, defined as follows: import { Pipe, PipeTransform } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; @Pipe({ name: 'sanitiseH ...

hyperlinks along the edges surrounding a centrally positioned image

I'm facing an issue with an image that is also a link. I used the following code: <a href="link.html"><img src="img.png" id="cloud"></img></a> After, I centered and resized it with the help of this CSS: #cloud { display: blo ...

Bringing elements into perfect harmony in Angular

Seeking guidance on HTML alignment using bootstrap for prebuilt components like buttons. Struggling with aligning divs and looking to learn more about grouping them together for proper alignment. Goal is to center elements on screen one above the other. ...

Creating unique CSS styles for SVG <use> elements in various situations

Is there a way to style a <use> element based on its parent class that will work consistently across different browsers? CSS Code Example .column-1 { .cls-1 { fill: red; } .cls-2 { fill: green; } } .column-2 { .cls-1 { fill: ...

Angular - What is the best way to pass the value of a variable that is declared within a component over to a service file?

Is there a way to access a variable declared inside a component in an Angular service file? I tried searching online but couldn't find a solution that fits my needs. mylib.component.ts import { Component, Input } from '@angular/core'; @Com ...

"Enhance Your Angular 6 Project with a Stunning jQuery Lightbox

Looking to incorporate jquery simple lightbox into my app, however I am encountering an issue. When I hardcode the image links, everything works fine - images are displayed from both external links and local folder. But when I try to use *ngFor directive t ...

Enhance your horizontal stacked bar chart in chart.js by incorporating inner labels with the help of the 'chartjs-plugin-labels' plugin

Currently, I have integrated a package that allows me to incorporate labels into my charts - import * as pluginDataLabels from "chartjs-plugin-labels"; While it works perfectly fine with line charts, pie charts, and normal bar charts, I am facin ...