Skip font size/weight for top element

pull/174/head
M66B 6 years ago
parent 531aad4504
commit 74c5937b63

@ -379,6 +379,7 @@ public class HtmlHelper {
case "font-size":
// https://developer.mozilla.org/en-US/docs/Web/CSS/font-size
if (element.parent() != null) {
Float fsize = getFontSize(value);
if (fsize != null && fsize != 0 &&
(fsize <= 0.8f || fsize >= 1.25)) {
@ -386,16 +387,19 @@ public class HtmlHelper {
element.replaceWith(e);
e.appendChild(element);
}
}
break;
case "font-weight":
// https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
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;
case "text-decoration":

Loading…
Cancel
Save