Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS to add custom background color to grafana panels based on panel title #56

Open
gk7279 opened this issue Jan 19, 2022 · 2 comments
Open
Labels
help wanted Extra attention is needed

Comments

@gk7279
Copy link

gk7279 commented Jan 19, 2022

What you are struggling with

Change background color of gauges based on panel title

Describe what assistance you need
CSS block

What you tried

Describe what you tried
https://community.grafana.com/t/panel-title-with-background-color/45411

Related Issues and Links

Related links

@gk7279 gk7279 added the help wanted Extra attention is needed label Jan 19, 2022
@gk7279 gk7279 changed the title [Help Required] Title CSS to add custom background color to grafana panels based on panel title Jan 19, 2022
@gk7279
Copy link
Author

gk7279 commented Jan 19, 2022

Basically "Add Panel BG Color" but only to specific panels and not all of them.

@mromero2510
Copy link

It seems Grafana's CSS changes on > 8.x.x

Try this:

.panel-title-container[data-testid="data-testid Panel header PANEL-NAME-HERE"]{
background-color: blue;
}

.panel-container[aria-label="PANEL-NAME-HERE panel"]{
background-color: red;
}

You can use the Inspect Tool in your browser to search the style you want to select and change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants