mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-26 17:57:16 +00:00
Skip font size/weight for top element
This commit is contained in:
parent
531aad4504
commit
74c5937b63
1 changed files with 15 additions and 11 deletions
|
@ -379,22 +379,26 @@ public class HtmlHelper {
|
|||
|
||||
case "font-size":
|
||||
// https://developer.mozilla.org/en-US/docs/Web/CSS/font-size
|
||||
Float fsize = getFontSize(value);
|
||||
if (fsize != null && fsize != 0 &&
|
||||
(fsize <= 0.8f || fsize >= 1.25)) {
|
||||
Element e = new Element(fsize < 1 ? "small" : "big");
|
||||
element.replaceWith(e);
|
||||
e.appendChild(element);
|
||||
if (element.parent() != null) {
|
||||
Float fsize = getFontSize(value);
|
||||
if (fsize != null && fsize != 0 &&
|
||||
(fsize <= 0.8f || fsize >= 1.25)) {
|
||||
Element e = new Element(fsize < 1 ? "small" : "big");
|
||||
element.replaceWith(e);
|
||||
e.appendChild(element);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "font-weight":
|
||||
// https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
|
||||
Integer fweight = getFontWeight(value);
|
||||
if (fweight != null && fweight >= 600) {
|
||||
Element strong = new Element("strong");
|
||||
element.replaceWith(strong);
|
||||
strong.appendChild(element);
|
||||
if (element.parent() != null) {
|
||||
Integer fweight = getFontWeight(value);
|
||||
if (fweight != null && fweight >= 600) {
|
||||
Element strong = new Element("strong");
|
||||
element.replaceWith(strong);
|
||||
strong.appendChild(element);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue