summaryrefslogtreecommitdiffstats
path: root/web/src/widget/text.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-05 01:04:46 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-05 01:04:46 +0100
commit28fd9feb40a024ea29f73fa91c21fc3f2cf01d58 (patch)
treee1df3d67f8e293b15940c447acb37a3ed0155b36 /web/src/widget/text.rs
parent0030bcbd33f5c4db60aac826552042e46b51c691 (diff)
downloadiced-28fd9feb40a024ea29f73fa91c21fc3f2cf01d58.tar.gz
iced-28fd9feb40a024ea29f73fa91c21fc3f2cf01d58.tar.bz2
iced-28fd9feb40a024ea29f73fa91c21fc3f2cf01d58.zip
Support styling for `Button` in `iced_web`
Diffstat (limited to '')
-rw-r--r--web/src/widget/text.rs5
1 files changed, 4 insertions, 1 deletions
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<Message> 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);