You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
datatracker render of svg diagrams shows all black #11994
This is happening because the affected rectangles don't have their fill attributes set. They are inheriting it from the container they're in. There's a CSS hack at
that matches on an absent fill attribute and substitutes the foreground color (--bs-body-color).
This particular case would be fixed by moving the :not([fill]) case to the group that becomes --bs-body-bg instead. That might affect other SVGs, though. @martinthomson, I think you originated that CSS - do you know offhand whether that would break things?
This SVG will never work with dark/light toggles. It will render much of the content as black on black. (Update: Seems fine with the fix.)
As you say, the :not([fill]) matcher is activating on the rect elements, which is overriding the fill attribute on the g element.
The fix would appear to be to switch to :not([fill], [fill] *), which only matches if the element and all its ancestors lack the attribute. That's not perfect (HTML outside of the SVG could include the attribute), but it's probably fine.
The fix would appear to be to switch to :not([fill], [fill] *), which only matches if the element and all its ancestors lack the attribute. That's not perfect (HTML outside of the SVG could include the attribute), but it's probably fine.
Activity
jennifer-richards commentedon Nov 5, 2026
This is happening because the affected rectangles don't have their
fillattributes set. They are inheriting it from the container they're in. There's a CSS hack atdatatracker/ietf/static/css/document_html_txt.scss
Lines 462 to 464 in 1663408
fillattribute and substitutes the foreground color (--bs-body-color).This particular case would be fixed by moving the
:not([fill])case to the group that becomes--bs-body-bginstead. That might affect other SVGs, though. @martinthomson, I think you originated that CSS - do you know offhand whether that would break things?martinthomson commentedon Nov 5, 2026
A URL would have been a great deal of help. https://datatracker.ietf.org/doc/html/draft-camarillo-fann-lsn-00
This SVG will never work with dark/light toggles. It will render much of the content as black on black.(Update: Seems fine with the fix.)As you say, the
:not([fill])matcher is activating on therectelements, which is overriding the fill attribute on thegelement.The fix would appear to be to switch to
:not([fill], [fill] *), which only matches if the element and all its ancestors lack the attribute. That's not perfect (HTML outside of the SVG could include the attribute), but it's probably fine.jennifer-richards commentedon Nov 6, 2026
Oops, sorry.
Awesome, thanks!
jennifer-richards commentedon Nov 10, 2026
Deployed and confirmed just now. Thanks again!