The version of Inter is updated to use a variable font, which is supported widely among modern browsers.
Using `display: swap` means that the browser will render the text of the spec even before Inter is loaded, making the website appear to load faster on mobile.
Allow the browser to use the local Inter font if it exists.
The first commit allows to lazy-load the diagrams, which should improve the loading time of the CS API on mobile. In the process it also improves the alt text of the images.
The second commit serves the diagrams as high-resolution WebPs. Encoding a high resolution diagram as WebP gives a file of approximately the same size as the lower resolution PNG. For maximum compatibility we also serve them as a lower resolution WebP and a fallback PNG. WebP was chosen because it is one of the export formats of draw.io/diagrams.net, and it is widely available in modern browsers.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Docsy does not set the `height` anymore, but the `min-height`, which doesn't seem to affect scroll-anchoring.
See f22a70ec56
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Use `p` elements to separate paragraphs instead of `br` and enforce single paragraphs to be wrapped in `p` for consistency.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
It was not enabled before the docsy update and it messes with
the TOC highlighting during the transition.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Add CORP headers to media repo
MSC: https://github.com/matrix-org/matrix-spec-proposals/pull/3828
* Write weird CSS rules to make added-in work inline in the CS spec
Even though our content doesn't need 2 paragraphs, it's good to have the capability to render it in the future.
* Remove test paragraph
* Refine prose
* spelling is key
* Configure syntax highlighter to use CSS classes
the inline `style` attributes cause CSP errors (and don't work). Instead, we
can use proper CSS classes.
* Configure response headers for Hugo dev server
make the dev server serve response headers which match the live site, for
better testing.
Now that we've dropped the old build pipeline (and an assets directory does not exist in the repo any longer, we can rename the hugo version of the assets (assets-hugo) created during the build tools migration back to simply assets.