mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Fix decimal letter spacing values (#1293)
This commit is contained in:
parent
52657441ad
commit
a6a206c721
@ -5,6 +5,6 @@ export const parseLetterSpacing = (letterSpacing: string): number => {
|
||||
if (letterSpacing === 'normal') {
|
||||
return 0;
|
||||
}
|
||||
const value = parseInt(letterSpacing, 10);
|
||||
const value = parseFloat(letterSpacing);
|
||||
return isNaN(value) ? 0 : value;
|
||||
};
|
||||
|
@ -126,6 +126,7 @@
|
||||
<li style="word-spacing:5px;">word-spacing:5px; (as each letter is rendered individually, the bounds will always be correct)</li>
|
||||
<li style="line-height:35px;">line-height:35px; <br />(same goes for line-height)</li>
|
||||
<li style="letter-spacing:5px;">letter-spacing:5px;</li>
|
||||
<li style="letter-spacing:0.9px;">letter-spacing:0.9px;</li>
|
||||
<li style="text-align:right;width:300px;">text-align:right;width:300px;</li>
|
||||
<li style="font-variant:small-caps;">font-variant:small-caps; </li>
|
||||
</ul>
|
||||
|
Loading…
x
Reference in New Issue
Block a user