Thank you for your detailed explanation and for clarifying the behavior you are observing. I understand why you assumed a PHP-side manipulation of the SVG, and I appreciate the time you took to describe your findings.
First, let me apologize for the inconvenience. To address your question directly: there is no PHP script parsing the SVG and injecting its paths into the DOM for color manipulation. The color handling is done entirely on the frontend via CSS.
Here is how it currently works in the Justice template:
-
The example logo that ships with the template is provided as inline SVG in the DOM. Because the paths are inline, CSS is able to target them and change their fill color when the header becomes sticky.
-
When a user uploads a custom SVG through Template Styles, the SVG is still inserted as inline, but due to a different internal structure of the uploaded logo compared to the example logo, the CSS-based color manipulation does not work. The selectors used for the template’s color transitions cannot properly target the paths of the custom SVG, so the color change does not take effect.
-
There is no PHP logic responsible for recoloring or restructuring the SVG. Everything is handled through CSS selectors applied to inline SVG paths.
We fully acknowledge that this behavior is not intuitive, especially when different SVG structures result in different outcomes. After discussing internally, we have already aligned on an improvement for usability:
In an upcoming release of the Justice template, we will introduce a dedicated field for the sticky logo. This will allow users to assign a different logo for the sticky header state without relying on inline SVG path manipulation or CSS targeting assumptions.
If you prefer not to wait for that release, we can configure the dual-logo setup directly on your site. For that, we would only need temporary Super User access.
We appreciate your patience and your technical observations. If you would like us to proceed with the manual setup, just let us know and we will take care of it.