I want to modify the dark theme in Grafana so that it uses #000000 as the background colour.
I have seen "How to change default black color of Grafana", however those answers only tell you how to choose between the light and the dark themes.
I also see that How to Customize Your Grafana Theme recommends editing the _variables.dark.scss file, however I cannot see where this is located, as it is not in the public/sass directory as the post suggests.
Finally, I also see that _variables.dark.generated.scss tells you to Edit grafana-ui/src/themes/_variables.dark.scss.tmpl.ts to update template, however I cannot find that file either.
Could you point me in the right direction, please?
Boom Theme plugin worked for me with Grafana 6.7.1
Installation:
grafana-cli plugins install yesoreyeram-boomtheme-panel
service grafana-server restart
Go to certain Dashboard and add new Panel. Select "Boom Plugin".
Enter this under "Custom Style / CSS Override"
.panel-container {
background-color: #000000;
}
.dashboard-container {
background-color: #000000;
}
.navbar {
background-color: #000000;
}
The Boom Theme plugin documentation is here: https://github.com/yesoreyeram/yesoreyeram-boomtheme-panel/tree/master/docs Documentation no longer exists, see the GitHub readme file instead.
P.S. In case you are embedding Grafana's dashboard/panel, check for "allow_embedding = true" under "[security]" section in grafana.ini and use &kiosk parameter in a URL to avoid menus
I found the same sites as you and was frustrated at first. Fortunately I then found the Grafana plugin "Boom Theme Panel" (https://grafana.com/grafana/plugins/yesoreyeram-boomtheme-panel).
It allows you to define a background image or to override the background color under "Custom Style / CSS Override" with the following settings:
.main-view {
background-color: #000000;
}
Related
I’m new with Ionic React and I’m looking for the correct way to integrate custom fonts and a custom icon set into my project, so that it’s working on all platforms as intended.
Custom Icon set
My goal is to make my custom icons work with IonIcon so that I can use the default styling options like “size” and the CSS variables (e…g --ioinc-stroke-weight).
What I did so far:
I added the icon set (all icons are svgs) into “public/assets/customicons/”
I imported IonIcon into my components where needed
Integrated the (e.g. )
So far the icons are displayed as intended and custom attributes “size” is working.
But, I’m not able to set the icon color or stroke-width programmatically. All the icons have set a default attributes (e.g. < g fill=“none” fill-rule=“evenodd” stroke="#092A5E" stroke-linecap=“round” stroke-linejoin=“round” stroke-width=“8” >). Even if I remove those default attributes, I’m not able to set them via CSS variables
Question 1: Is “public/assets/customicons/” the correct folder to store the icons?
Question 2: How can I make it work that I can change the color of the icon via CSS?
Custom Font
Goal: I want that the custom font is shown on all platforms
What I did so far:
Added the custom fonts in “src/assets/fonts/”
Created a “fonts.css” in “src/theme/” where I integrated the font via “#font-face”
#font-face {
font-family: ‘FONTNAME’;
src: url(’…/assets/fonts/FONTNAME.ttf’);
font-style: normal;
font-weight: 400;
font-display: swap;
}
assigned the font to differnet elements
Question 1: Is this the correct folder to store the custom fonts? (I wasn’t able to do the same when the custom font was saved under “public/assets/fonts/” like the icon set)
Unfortunately, I wasn’t able to find any docs, tutorials or posts on any of these topics.
Thanks for your help!
I am using the Leaflet map api and I downloaded and installed the 'leaflet-routing-machine' plugin just yesterday. The problem is the square window on the right has only white text so nothing can be read in the route directions. Has anyone else experienced this with this plugin?
How would you change it?
I tried re-linking the librairies and everything seems linked correctly.
I expect the routing instructions to appear in black font color instead of white is all, so that they can be read.
Thanks,
Les
Try adding this to your CSS:
.leaflet-right {
color: #000000;
}
You may also try this:
.leaflet-touch .leaflet-control-layers, .leaflet-touch .leaflet-bar {
color: #000000;
}
Depending on what is overlaying the white text styles you might need to use !important in the given code.
I'm working on updating an Ionic 3 application to Ionic 4. I'm having an issue with the app css not working. I copied everything within app.scss from the original application to global.scss in the new application.
When I load up the first page of the app it looks nothing like the original application. I thought this part was more or less copy/paste but I may be wrong. One thing I experimented with was a line of css I have that looks like:
ion-input.input {
margin-bottom: 0;
border: 1px solid lightgrey;
}
and changed it to
ion-input {
margin-bottom: 0;
border: 1px solid lightgrey;
}
The new application then seems to take the border into account. Is there some major css changes needed in this conversion? or am I missing something?
Yes there are major changes. Now that Ionic 4 is based on web components the insides of them are encapsulated.
This is so they can be dropped into any page and look how the developer expects it to look, rather than being messed up by the pages styles.
The web components expose certain settings that can be styled. These are listed at the end of each documentation page. For example with ion-input:
ion-input - custom css properties - Ionic Documentation
Here is a solution for the border, and here is a solution for margin. Unfortunately the reason this has to be changed in Ionic 4 is because the Shadow DOM is now being implemented. Here is more info on that. Cheers :)
I have created a Non-Google ad banner using Google Web Designer and have used a video component to show the video. Everything works fine.
The accessibility feature, a blue border appears when the video component is clicked to play or pause the video.
I have added the following code to hide the blue border but it doesn't help.
.gwd-video-1ggs:focus, .gwd-video-1ggs:active {
outline: none !important;
box-shadow: none !important;
}
It happens only in the Chrome browser and not in Safari. Is there a potential solution to this?
Solved
I followed this post - [https://nelo.is/writing/styling-better-focus-states/][1]
Add the following code to remove the blue border.
*:focus:not(.focus-visible) {
outline: none;
}
.focus-visible {
outline-color: lightgreen;
}
The blog post explains it in details.
I'm trying to create icon buttons. I've downloaded them from flaticon.com and had them exported as icon font files, which includes a TTF file.
In my css file I specify the external font as:
#font-face {
font-family: flaticon;
src: url('/flaticon/flaticon.ttf');
}
I've defined a button class that should use this font as follows:
.flaticon-button {
-fx-font-size: 90px;
-fx-font-family: flaticon;
-fx-padding: 10px;
}
My code applies the styleclass as follows:
Button button = new Button("\ue000");
button.getStyleClass().add("flaticon-button");
But unfortunately it doesn't show the expected icon.
When I load the font in my code and set it explicitly the correct icon is shown:
Font font = Font.loadFont(this.getClass().getResource("/flaticon/flaticon.ttf").toExternalForm() , 90d);
Button button = new Button("\ue000");
button.setFont(font);
I'm obviously overlooking something small, but despite how many examples I browse on the internet, or how long I stare at Oracle's CSS documentation I can't see what.
So, what is wrong with my CSS declaration and usage?
Thanks to the comment of rossum, I realized it it might have something to do with the URL not resolving to the class, as Class.getResource() does.
By loading the font in the main, before it is references by the code, it seems to be resolved. I guess there is no other way, but it seems to be a bit of a hack to me.