From 28fd9feb40a024ea29f73fa91c21fc3f2cf01d58 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 5 Feb 2020 01:04:46 +0100 Subject: Support styling for `Button` in `iced_web` --- web/src/widget/text.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'web/src/widget/text.rs') diff --git a/web/src/widget/text.rs b/web/src/widget/text.rs index c5b07747..46230fef 100644 --- a/web/src/widget/text.rs +++ b/web/src/widget/text.rs @@ -117,7 +117,10 @@ impl<'a, Message> Widget for Text { use dodrio::builder::*; let content = bumpalo::format!(in bump, "{}", self.content); - let color = css::color(self.color.unwrap_or(Color::BLACK)); + let color = self + .color + .map(css::color) + .unwrap_or(String::from("inherit")); let width = css::length(self.width); let height = css::length(self.height); -- cgit