I'm using this SVG to create a simple signal level meter:
<svg id="outdoor-meter" class="svg-flow" svg-flow="current-temp,dx=-5,dy=-3.5">
<svg viewBox="0 0 640 512" class="signal-meter" width="2" height="1.6">
<rect x= "24" y="384" width="80" height="128" class="signal-bar-1"/>
<rect x="152" y="288" width="80" height="224" class="signal-bar-2"/>
<rect x="280" y="192" width="80" height="320" class="signal-bar-3"/>
<rect x="408" y= "96" width="80" height="416" class="signal-bar-4"/>
<rect x="536" y= "0" width="80" height="512" class="signal-bar-5"/>
<line style="display: none; stroke-width: 40px; stroke: rgb(255, 0, 0);" class="no-signal" x1="64" y1="40" x2="576" y2="424"/>
</svg>
</svg>
In Chrome, this looks like this (the small green and blue bar graphs below):
In Firefox, these signal level meters are completely invisible, although there are no other SVG problems on the rest of the chock-full-of-SVG page.
The only CSS classes that directly affect rendering are the signal-bar-
x classes (which decide which bars are visible), no-signal
(to display a red slash), and a programmatically-applied color filter. The svg-flow
class doesn't have any associated CSS; it's used for JavaScript to find and reposition the image as needed.
When inspecting the signal meter's element in Firefox there's no sign that it's been made invisible by CSS, or accidentally positioned offscreen. What is weird is that when I hover over the outer-level <svg>
tag, a HUGE portion of the screen is highlighted, and the element is supposedly over 1300x800 pixels. Doing the same in Chrome, only the tiny and visible meter is highlighted, reporting a much more reasonable size of around 12x11 pixels.
Full source code can be found here: https://github.com/kshetline/aw-clock
And there's a live demo here: https://weather.shetline.com/
..but unfortunately, that's only good for seeing that all of the rest of the SVG works, since the web site doesn't have its own wireless temperature/humidity sensors, which is what the signal meters are for.
Any ideas on how to make this SVG work for Firefox?