A card name that must break mid-word gets a hyphen
hyphens:auto on the name, with the deck's <html lang> naming the language, so a 16-letter name like Liechtensteiners that overflow-wrap has to split breaks with a hyphen rather than silently mid-word.
This commit is contained in:
parent
b8c7e9a391
commit
7cdf72bfd4
1 changed files with 3 additions and 2 deletions
|
|
@ -143,10 +143,11 @@ export function createCardRenderer({ strings, lang = 'en', stock = 'poker',
|
|||
? `left:10px;width:${COL - 20}px;top:${12 + PH + 6}px;bottom:10px;align-items:flex-start;justify-content:center;text-align:center;`
|
||||
: `left:${12 + PW + 10}px;right:8px;top:0;height:${BAND}px;`}
|
||||
font:700 ${SIDE ? 14 : 17}px Georgia,serif;color:#1b1a17;line-height:1.1;overflow:hidden;
|
||||
overflow-wrap:anywhere}
|
||||
overflow-wrap:anywhere;-webkit-hyphens:auto;hyphens:auto}
|
||||
/* Steps by the LONGEST WORD as well as the length: the name sits in a narrow box beside the photo,
|
||||
and one unbreakable word (the dataset has 16-letter ones, e.g. Pagativeshagallu) would overflow it
|
||||
sideways. overflow-wrap:anywhere is the last resort, so a name is never cut off without a sign. */
|
||||
sideways. overflow-wrap:anywhere is the last resort, so a name is never cut off without a sign;
|
||||
hyphens:auto (the deck's <html lang> names the language) puts a hyphen where it does break. */
|
||||
.nm.long{font-size:${SIDE ? 11.5 : 14}px}
|
||||
.nm.xlong{font-size:${SIDE ? 10.5 : 11}px}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue