Wir werden unser Farbschema neu gestalten. Die Kopfzeile wird grün sein, mit einem weißen Logo in der Kopfzeile.
Ich habe Schwierigkeiten herauszufinden, wie man die Farben des Lupensymbols und des Hamburger-Menü-Icons in der Kopfzeile ändert. Derzeit sind sie grau, was auf einem grünen Hintergrund sehr schlecht aussehen würde. Die weißen Icons würden auch besser zum neuen Kopfzeilen-Logo passen.
Ich habe im Themen-Menü nachgeschaut und dort eine Option namens „Header primary" gefunden, deren Beschreibung besagt, dass sie Text und Icons in der Kopfzeile der Website ändert. Ich habe sie jedoch bereits auf Weiß gesetzt, und es hat sich nichts geändert. Gibt es eine andere Möglichkeit, die Farbe dieser beiden Icons zu ändern?
The icons are a bit transparent, which might be throwing you off (that’s why they look grey instead of white when the header_primary color is set to white).
However, perhaps as we are now on one of the latest releases, now the home, search, and menu icons are greyed out. Can you explain how to make these icons white with opacity of 1? Did any of the selectors change?
Yes, these selectors are a little more specific now and we removed the opacity entirely in favor of using a solid color (there was a bug in Safari where SVG icons were clipped slightly because of the opacity).
You can remove anything you have related to opacity, and do this
I have a similar problem as the OP, probably somewhat simpler: For some reason the colour of the header icons got darker for no apparent reason (I assume it was related to the tidy-up measures on your side). Since my header is a darkish, I want the icons brighter.
I tried this
and am happy with the result. But I can’t seem to figure out how the hover settings work. With only the above css, my hover looks like this:
So the icon turns grey again, which is okay, but I’d like to try some other tints on it. The background seems to turn white (or almost white), which I would like to change to make it coherent with other menus.
I’m posting this in case someone runs into the same issue as me, but depending on the combination of colors you are using for your header and your icons (my header is a dark color), I was getting the right color combinations for my icons with the code you provided:
.d-header-icons .d-icon {
color: white !important;
}
.d-header-icons a:hover {
background-color: #789946 !important;
color: white !important;
}
However, whenever I clicked on the header icons and hovered out of them, the background reverted to a solid white color, which did not work as my header is dark and my icons are set to white. So on hovering out of them (after a click), they would show as a solid white rectangle). To fix this, all I had to do was also set the state for “a”, not just “a:hover” as in the above posts (#93bb54 being the same color as my header):
.d-header-icons .d-icon {
color: white !important;
}
.d-header-icons a:hover {
background-color: #789946 !important;
color: white !important;
}
.d-header-icons a {
background-color: #93bb54 !important;
color: white !important;
}
I added some custom icons in SVG, but I can’t change their color using CSS. They are always black. I can change the opacity, size … but never the color.
I tried using the above examples, but none returned the expected result.
Solche sehr spezifischen CSS-Selektoren funktionieren zwar, werden aber selten verwendet, da es normalerweise nicht notwendig ist, so spezifisch zu sein:
svg.fa.d-icon.d-icon-bolt.svg-icon.svg-node{
/* dein cooler CSS-Code hier */
}
In der Praxis sollte jedoch dieser einfache Selektor völlig ausreichen:
svg.d-icon-bolt{
/* dein cooler CSS-Code hier */
}
Ich habe die gleiche Situation wie Sentinelrv. Ich habe die Primärfarbe des Headers auf Weiß eingestellt und auch den empfohlenen benutzerdefinierten CSS-Code auf jedes meiner Themes angewendet, aber die Lupe und das Hamburger-Menü bleiben weiterhin grau.
Ich kann die Farben des Hamburger-/Balkenmenüs ebenfalls nicht ändern, das Such-/Find-Symbol hat sich geändert – ich habe alle oben genannten Tipps und mehr ausprobiert, indem ich Dinge im Webbrowser inspiziert habe, aber (da ich kein Webentwickler bin) bin ich gescheitert. Hat das jemand herausgefunden?
<header icons color>, <hamburger icons color>, <header icon hover color>, <hamburger icon hover color> = Hex, Farbname oder Theme-Farbvariablen. Sie können auch background-color angeben, wenn Sie die Icon-Hintergrundfarbe ändern möchten.
Hinweis: Wenn Sie den Hamburger-Dropdown-Modus anstelle der Seitenleiste verwenden, enthält der erste Ausschnitt für die Header-Icons auf der rechten Seite auch das Hamburger-Icon.