Fixar skalningen
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Joakim Svensson 2025-04-19 09:53:33 +00:00
parent 3e8831d1e5
commit f9014afc53
2 changed files with 43 additions and 13 deletions

View File

@ -1,14 +1,44 @@
.ascii-wrapper { .ascii-scaler {
display: flex; width: 100%;
justify-content: center; overflow: hidden;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
padding: 1rem 0; padding: 1rem 0;
} }
.ascii-wrapper pre { .ascii-scaler pre {
font-size: clamp(0.4rem, 1.2vw + 0.2rem, 1rem); display: inline-block;
line-height: 1.2;
margin: 0;
white-space: pre; white-space: pre;
} margin: 0;
line-height: 1.2;
transform-origin: left top;
}
/* Skala ner innehållet så det alltid får plats */
@media screen {
.ascii-scaler {
font-size: 1rem;
display: grid;
place-items: start;
}
.ascii-scaler::after {
content: "";
display: block;
padding-bottom: 1rem;
}
.ascii-scaler pre {
font-size: 1rem;
scale: 1;
}
@supports (container-type: inline-size) {
.ascii-scaler {
container-type: inline-size;
}
.ascii-scaler pre {
font-size: 1rem;
scale: calc(100cqi / max(100cqi, 70ch));
}
}
}

View File

@ -3,8 +3,8 @@ title: HF
--- ---
<div class="ascii-wrapper"> <div class="ascii-scaler">
<pre><code> <pre>
__ __ __ __ ________ __ __ __ __ ________
|\_\ |\_\ |\_\ |\_\ |\ ______\ |\_\ |\_\ |\_\ |\_\ |\ ______\
| XX | XX \XX ______ | XX____ | XXXXXXXX ______ _____ ______ __ __ _____ _______ ______ __ __ | XX | XX \XX ______ | XX____ | XXXXXXXX ______ _____ ______ __ __ _____ _______ ______ __ __
@ -19,7 +19,7 @@ title: HF
\XXXXXX \XX \XXXXXX \XXXXXX \XX \XXXXXX
SA6ANW 20240104 SA6ANW 20240104
</code></pre> </pre>
</div> </div>
**Systemskiss** **Systemskiss**