feat(slint): +1px typography scale and shared paragraph-preserving strip_html
Two text-side refinements to the artist + album views.
Typography:
- Bumps every scale level by 1px so body text reads at 15px instead
of 14px (legal 13, link 14, body/subtitle 15, button 17, heading
19, title 25, wordmark 29). All views adopt the new scale through
the existing tokens — the artist + album descriptions feel
noticeably more readable without per-component overrides.
strip_html (new shared module `crates/qbz-slint/src/strip_html.rs`):
- Single implementation now used by both album::map_album and
artist::map_artist for editorial copy (reviews, biographies).
The previous album-local helper handled only <br> and </p>; the
artist-local helper handled neither, so multi-paragraph
biographies collapsed into one wall of text.
- <br>, <br/>, <br /> (any case + spacing) -> \n. </p>, </P> ->
\n\n. Stripped tags like <strong>, <em>, <a> still leave their
text inline. (Slint's `Text` is single-style, so true inline
bold/italic isn't possible without splitting into multiple Text
elements — deferred.)
- Broader entity table: amp/lt/gt/quot/apos/nbsp/copy/reg/mdash/
ndash/hellip/curly quotes plus numeric copy variants.
- Runs of 3+ newlines collapse to a paragraph break so stacked tags
don't blow the layout open. Unit tests for each path.
cc
This commit is contained in:
5 files changed
+214
-72
No files matched your search
@@ -1,14 +1,14 @@
|
||||
// Typography scale — font sizes and weights.
|
||||
|
||||
export global Typography {
|
||||
out property <length> legal: 12px;
|
||||
out property <length> link: 13px;
|
||||
out property <length> body: 14px;
|
||||
out property <length> subtitle: 14px;
|
||||
out property <length> button: 16px;
|
||||
out property <length> heading: 18px;
|
||||
out property <length> title: 24px;
|
||||
out property <length> wordmark: 28px;
|
||||
out property <length> legal: 13px;
|
||||
out property <length> link: 14px;
|
||||
out property <length> body: 15px;
|
||||
out property <length> subtitle: 15px;
|
||||
out property <length> button: 17px;
|
||||
out property <length> heading: 19px;
|
||||
out property <length> title: 25px;
|
||||
out property <length> wordmark: 29px;
|
||||
|
||||
out property <int> regular: 400;
|
||||
out property <int> medium: 500;
|
||||
|
||||
Reference in new issue
Block a user