Repository navigation
Support theme-aware image variants, SVG images, and guidance for image creation - #3518
Merged
Merged
Conversation
|
Pull request environment is available at https://stoctodocspr3518.z22.web.core.windows.net/. You can view the ephemeral environment status in Octopus Deploy. This environment will be automatically deprovisioned when the pull request is closed, or after 7 days of inactivity. |
samironsoctopus
requested review from
KMajkrzakOctopus,
enf0rc3 and
mattallford
and removed request for
KMajkrzakOctopus
October 19, 2026 00:33
borland
reviewed
Oct 21, 2026
borland
reviewed
Oct 21, 2026
samironsoctopus
requested review from
KMajkrzakOctopus,
borland,
steve-fenton-octopus and
tonykelly-octopus
and removed request for
KMajkrzakOctopus,
enf0rc3 and
mattallford
October 21, 2026 21:31
borland
force-pushed
the
si/update-kubernetes-diagrams
branch
from
November 3, 2026 18:41
3085f0c to
d8a3178
Compare
Replace the Deploy Container and Load Balancer diagrams with Figma exports in light and dark variants. Images marked theme-light-only or theme-dark-only are hidden by the html[data-theme] attribute, so the swap follows the site's theme toggle as well as the OS setting. SVG figures now fill the content column, and the zoom lightbox no longer caps vector images at their exported width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace both diagrams with revised Figma exports, and update the Deploy Container figure's width and height to the new 480x270 size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add guidance to the README on deciding whether a page needs a screenshot, sizing PNGs and SVGs for the content column, creating clear images, and adding light and dark variants with the theme-light-only and theme-dark-only classes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SVG files are markup, not prose, so cspell flags attribute names such as stroke-dasharray. Diagram labels exported from Figma are outlined paths, so there's no text in them to check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The :img directive rewrote every image to a /docs/i/ path, but img.mjs only generates variants for raster images, so an SVG pointed at a file that never existed. It also dropped resp-img whenever a class was set. SVGs now keep their own path and take their width and height from the file, and an @2x image shows at half its pixel size. The Kubernetes diagrams and the README guidance use the directive instead of raw <img> tags, so sizes no longer have to be set by hand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Support a src-dark attribute on the :img directive so images can switch with the site theme - Stop the zoom view fetching the hidden themed variant - Separate the commented-out lists with blank lines for markdownlint Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
borland
force-pushed
the
si/update-kubernetes-diagrams
branch
from
November 20, 2026 03:20
d8a3178 to
6ac6c2a
Compare
borland
approved these changes
Nov 20, 2026
borland
left a comment
Contributor
There was a problem hiding this comment.
Discussed this with Sam who is happy for me to merge it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is a combination PR from @samironsoctopus and @borland
README.mdto help people create high quality images that follow the theme.SVG sizing
figurenow fill the content column (figure img[src$='.svg'] { width: 100%; }), because they scale without losing sharpness. This also widenshigh-availability.svgslightly, from 800px to the column width. The other existing SVG figures were already column-width.src/scripts/modules/figures.jsno longer limits vector images to their exported width. PNG and JPG keep the existing limit.Themed Image Variants
:imgdirective now has asrc-darkattribute. It can now be used like this:src-darkthen the docs build process produces an HTML<picture>which wraps both the light and dark variants and uses CSS media queries to select which one is loaded.Like this:
Note: If the user's browser matches their docs theme preference, then the
<picture>plus CSS media query does its job, and the user's browser will only download the variant that they will see.If they've overridden the OS default, then the browser ends up downloading both variants. I've used claude and done quite a bit of manual testing; there is no flicker or visible artifacting on any of Chrome/Edge/Firefox/Safari, it's just a bit of wasted bandwidth. FIxing this properly was really tricky, we would have needed much more complicated JS which would have increased the risk of breakage and I did not take that as a good tradeoff.