fix: Logo-Farbe auch auf Gradient-Stops (mittlerer Ball) anwenden
Neben solid fills auch SVG stop-Elemente mit stop-color='rgb(255,223,0)' markieren und per CSS stop-color überschreiben. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
11
index.html
11
index.html
@@ -214,10 +214,15 @@
|
||||
function _markYellowElements() {
|
||||
const svg = document.querySelector('#lottie-logo svg');
|
||||
if (!svg) return false;
|
||||
// Solid fills (kleine Partikel)
|
||||
svg.querySelectorAll('[fill="rgb(255,223,0)"]').forEach(el => {
|
||||
el.classList.add('logo-primary-fill');
|
||||
});
|
||||
return svg.querySelector('.logo-primary-fill') !== null;
|
||||
// Gradient stops (mittlerer Blob)
|
||||
svg.querySelectorAll('stop[stop-color="rgb(255,223,0)"]').forEach(el => {
|
||||
el.classList.add('logo-primary-stop');
|
||||
});
|
||||
return svg.querySelector('.logo-primary-fill, .logo-primary-stop') !== null;
|
||||
}
|
||||
|
||||
function setLogoColor(hex) {
|
||||
@@ -229,7 +234,9 @@
|
||||
_logoStyleEl = document.createElement('style');
|
||||
document.head.appendChild(_logoStyleEl);
|
||||
}
|
||||
_logoStyleEl.textContent = '#lottie-logo .logo-primary-fill { fill: ' + hex + '; }';
|
||||
_logoStyleEl.textContent =
|
||||
'#lottie-logo .logo-primary-fill { fill: ' + hex + '; }' +
|
||||
'#lottie-logo .logo-primary-stop { stop-color: ' + hex + '; }';
|
||||
}
|
||||
|
||||
document.addEventListener('colorChanged', (e) => {
|
||||
|
||||
Reference in New Issue
Block a user