Matrix icon in footer is invisible #8

Closed
opened 2024-05-06 03:59:06 +00:00 by winter · 2 comments
Member
No description provided.
Contributor

Seems to render correctly in {firefox,chrome}x{nixos,android,macos}, but fails on Safari+macOS and all browsers on iOS (per Apple policy they're forced to use Safari's rendering engine).

Poking around in the inspector, it's because the Matrix <svg> elements doesn't have width and height attributes, so Safari renders it as a 0x0 element. Setting an explicit 16x16 viewport makes Safari render correctly, and doesn't seem to break {firefox,chrome}x{nixos}. I'll send a PR

Seems to render correctly in {firefox,chrome}x{nixos,android,macos}, but fails on Safari+macOS and all browsers on iOS (per Apple policy they're forced to use Safari's rendering engine). Poking around in the inspector, it's because the Matrix `<svg>` elements doesn't have `width` and `height` attributes, so Safari renders it as a 0x0 element. Setting an explicit 16x16 viewport makes Safari render correctly, and doesn't seem to break {firefox,chrome}x{nixos}. I'll send a PR
Contributor

Further detail: the SVG 2 spec introduced the auto value for width/height, to calculate the viewport dimensions based on content dimensions: https://www.w3.org/TR/SVG2/embedded.html#Placement

Firefox and Chrome seem to default width/height for svg elements to auto, whereas Safari doesn't (maybe sticks with SVG 1.1 behavior?) and so the viewport collapses into a singularity unless explicitly expanded.

Further detail: the SVG 2 spec introduced the `auto` value for width/height, to calculate the viewport dimensions based on content dimensions: https://www.w3.org/TR/SVG2/embedded.html#Placement Firefox and Chrome seem to default width/height for svg elements to `auto`, whereas Safari doesn't (maybe sticks with SVG 1.1 behavior?) and so the viewport collapses into a singularity unless explicitly expanded.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix-website#8
No description provided.