Skip to content

Commit 088a907

Browse files
committed
SVG article example
1 parent 1abde21 commit 088a907

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

_posts/2026-01-10-making-svgs-dark-mode-reading-mode-friendly.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ image:
99
meta:
1010
src: /files/2026/01/flowchart.png
1111
alt: A diagram in light and dark modes
12-
last_modified_at: 2026-01-10 23:41 +0000
12+
last_modified_at: 2026-01-12 22:39 +0000
1313
---
1414

1515
I use Scalable Vector Graphics (SVGs) on this site as they're an effective format for diagrams; they can be easily modified, styled, animated and localised.
@@ -48,7 +48,9 @@ There's no way to apply CSS to the reading mode view, so any background colour n
4848
</svg>
4949
```
5050

51-
Again, this isn't exactly a satisfying solution, but it does mean a single SVG can be used in all rendering contexts.
51+
Again, this isn't exactly a satisfying solution, but it does mean a single SVG can be used in all rendering contexts. Here's an example:
52+
53+
{% include figure.html object="/files/2026/01/example.svg" alt="A rectangle labelled 'Hello world'" %}
5254

5355
Have I missed a neater solution? Is there something I've not considered with this approach? Do other browsers run into the same (or different) problems?
5456

files/2026/01/example.svg

Lines changed: 15 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)