Fix empty fill list rendering as default black

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
YohYamasaki
2026-05-19 04:25:36 +02:00
committed by GitHub
parent 1802829c87
commit 3091a6f2df

View File

@@ -40,7 +40,7 @@ impl RenderExt for List<Color> {
_transformed_bounds: DAffine2,
_render_params: &RenderParams,
) -> Self::Output {
let Some(color) = self.element(0) else { return String::new() };
let Some(color) = self.element(0) else { return r#" fill="none""#.to_string() };
let mut result = format!(r##" fill="#{}""##, SRGBA8::from(*color).to_rgb_hex());
if color.a() < 1. {