mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +01:00
fix(css): report unsupported declarations at debug level
Tailwind-generated doc-viewer CSS contains standard values LCUI does not implement (fixed, sticky, grid, table, ...). Skipping them is expected fallback behavior, so log the property or value at debug level instead of error.
This commit is contained in:
@@ -200,8 +200,8 @@ static int css_parser_parse_style_property_value(css_parser_t *parser)
|
||||
assert(parser->style_parser.property != NULL);
|
||||
propdef = css_get_propdef_by_name(parser->style_parser.property);
|
||||
if (!propdef) {
|
||||
logger_error(
|
||||
"[css-parser] [property: %s] value type not defined\n",
|
||||
logger_debug(
|
||||
"[css-parser] [property: %s] unsupported property\n",
|
||||
parser->style_parser.property);
|
||||
free(parser->style_parser.property);
|
||||
parser->style_parser.property = NULL;
|
||||
@@ -211,12 +211,12 @@ static int css_parser_parse_style_property_value(css_parser_t *parser)
|
||||
propdef, parser->buffer);
|
||||
if (result <= 0) {
|
||||
if (propdef->key >= 0) {
|
||||
logger_error(
|
||||
"[css-parser] [property: %s] invalid value: %s\n",
|
||||
propdef->name, parser->buffer);
|
||||
logger_debug("[css-parser] [property: %s] unsupported "
|
||||
"value: %s\n",
|
||||
propdef->name, parser->buffer);
|
||||
} else {
|
||||
logger_error("[css-parser] [shorthand property: %s] "
|
||||
"invalid value: %s\n",
|
||||
logger_debug("[css-parser] [shorthand property: %s] "
|
||||
"unsupported value: %s\n",
|
||||
propdef->name, parser->buffer);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user