mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-06 21:05:38 +01:00
Added support for ex dimension
This commit is contained in:
@@ -1420,6 +1420,8 @@ public class HtmlHelper {
|
||||
return Float.parseFloat(value.substring(0, value.length() - 3).trim());
|
||||
if (value.endsWith("em"))
|
||||
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"))
|
||||
return Float.parseFloat(value.substring(0, value.length() - 2).trim()) / DEFAULT_FONT_SIZE_PT;
|
||||
if (value.endsWith("px"))
|
||||
|
||||
Reference in New Issue
Block a user