Added support for background css property

This commit is contained in:
M66B 2021-09-28 07:45:43 +02:00
parent de8162a88e
commit 49570e7e02
1 changed files with 12 additions and 5 deletions

View File

@ -603,12 +603,18 @@ public class HtmlHelper {
String value = kv.get(key);
switch (key) {
case "color":
case "background":
case "background-color":
// https://developer.mozilla.org/en-US/docs/Web/CSS/color
if ("color".equals(key) && !text_color)
// https://developer.mozilla.org/en-US/docs/Web/CSS/background
// https://developer.mozilla.org/en-US/docs/Web/CSS/background-color
if ("color".equals(key)) {
if (!text_color)
continue;
if ("background-color".equals(key) && !background_color)
} else {
if (!background_color)
continue;
}
Integer color = parseColor(value);
@ -2656,6 +2662,7 @@ public class HtmlHelper {
String value = param.substring(semi + 1);
switch (key) {
case "color":
case "background":
case "background-color":
if (!TextUtils.isEmpty(value))
try {