remove width/height from svg output

This commit is contained in:
Rhiannon Morris 2024-11-28 17:38:00 +01:00
parent 89270a82fb
commit a2fc6c9f28
4 changed files with 13 additions and 8 deletions

View file

@ -104,9 +104,8 @@ doGlyphsNoDoctype gs e = wrap $ run act e where
Fill_ <<- "none"] Fill_ <<- "none"]
g_ gattrs . mconcat <$> traverse placeWord gs <* newline g_ gattrs . mconcat <$> traverse placeWord gs <* newline
wrap (content, T {width, height}) = wrap (content, T {width, height}) =
let w = toPx width; h = toPx height let viewBox = Text.unwords ["0", "0", toNoDim width, toNoDim height] in
viewBox = Text.unwords ["0", "0", toNoDim width, toNoDim height] in svg11_ content `with` [ViewBox_ <<- viewBox]
svg11_ content `with` [Width_ <<- w, Height_ <<- h, ViewBox_ <<- viewBox]
doGlyphs :: [Word] -> Env -> Element doGlyphs :: [Word] -> Env -> Element
doGlyphs gs e = doctype <> doGlyphsNoDoctype gs e doGlyphs gs e = doctype <> doGlyphsNoDoctype gs e

View file

@ -22,5 +22,7 @@ couple of buzzwords each:
* [an unnamed language with a volapük-ass aesthetic](vol) * [an unnamed language with a volapük-ass aesthetic](vol)
* [unnamed kobold language](kobl)
Also, [a mirror](syn-test-cases.html) of some syntax test cases, originally Also, [a mirror](syn-test-cases.html) of some syntax test cases, originally
compiled by Gary Shannon, that might be useful to someone. compiled by Gary Shannon, that might be useful to someone.

View file

@ -5,7 +5,7 @@ conlang: lántas
... ...
:::splash :::splash
`{#lántas | size = 20 ; stroke = 10}` `{#lántas}`
::: :::
1. [Phonology](phono.html) 1. [Phonology](phono.html)

View file

@ -154,10 +154,14 @@ pre {
height: 2em; height: 2em;
} }
:is(.splash, .example) .scr { .example .scr {
height: unset; width: 80%; height: auto;
display: block; display: block; margin: auto;
margin: auto; }
.splash .scr {
height: 10em;
display: block; margin: auto;
} }
.example { .example {