mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-03 21:55:13 +00:00
Added support for ex dimension
This commit is contained in:
parent
592ded9470
commit
802270160b
1 changed files with 2 additions and 0 deletions
|
@ -1420,6 +1420,8 @@ public class HtmlHelper {
|
||||||
return Float.parseFloat(value.substring(0, value.length() - 3).trim());
|
return Float.parseFloat(value.substring(0, value.length() - 3).trim());
|
||||||
if (value.endsWith("em"))
|
if (value.endsWith("em"))
|
||||||
return Float.parseFloat(value.substring(0, value.length() - 2).trim()) * current;
|
return Float.parseFloat(value.substring(0, value.length() - 2).trim()) * current;
|
||||||
|
if (value.endsWith("ex")) // 1 ex = 0.5 em
|
||||||
|
return Float.parseFloat(value.substring(0, value.length() - 2).trim()) / 2 * current;
|
||||||
if (value.endsWith("pt"))
|
if (value.endsWith("pt"))
|
||||||
return Float.parseFloat(value.substring(0, value.length() - 2).trim()) / DEFAULT_FONT_SIZE_PT;
|
return Float.parseFloat(value.substring(0, value.length() - 2).trim()) / DEFAULT_FONT_SIZE_PT;
|
||||||
if (value.endsWith("px"))
|
if (value.endsWith("px"))
|
||||||
|
|
Loading…
Reference in a new issue