diff --git a/flumi/Scripts/B9/CSSParser.gd b/flumi/Scripts/B9/CSSParser.gd index 2662d33..a5b45a5 100644 --- a/flumi/Scripts/B9/CSSParser.gd +++ b/flumi/Scripts/B9/CSSParser.gd @@ -890,6 +890,13 @@ static func parse_utility_class_internal(rule: CSSRule, utility_name: String) -> rule.properties["opacity"] = val.to_int() / 100.0 return + # Handle object-fit classes for images + match utility_name: + "object-none": rule.properties["object-fit"] = "none"; return + "object-fill": rule.properties["object-fit"] = "fill"; return + "object-contain": rule.properties["object-fit"] = "contain"; return + "object-cover": rule.properties["object-fit"] = "cover"; return + # Handle more utility classes as needed # Add more cases here for other utilities diff --git a/flumi/Scripts/Constants.gd b/flumi/Scripts/Constants.gd index e0c5dfb..7634fee 100644 --- a/flumi/Scripts/Constants.gd +++ b/flumi/Scripts/Constants.gd @@ -2014,7 +2014,7 @@ var HTML_CONTENTy = """
""".to_utf8_buffer() -var HTML_CONTENT = """ +var HTML_CONTENTyea = """object-none: Godot's STRETCH_KEEP - Image keeps original dimensions
+object-fill: Godot's STRETCH_SCALE - Image stretches to fill container
+object-contain: Godot's STRETCH_KEEP_ASPECT - Image fits inside with preserved aspect ratio
+object-cover: Godot's STRETCH_KEEP_ASPECT_COVERED - Image covers container with preserved aspect ratio
+