From 3c59a2750aab9148a63c027fe4bebf83859c5021 Mon Sep 17 00:00:00 2001 From: Jovansonlee Cesar Date: Fri, 19 Apr 2024 04:03:51 +0800 Subject: [PATCH] feat: add clip-path on fancy-ui --- examples/fancy-ui/src/frame.rs | 7 +++++++ examples/fancy-ui/src/lib.rs | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/examples/fancy-ui/src/frame.rs b/examples/fancy-ui/src/frame.rs index 87d206d2..f137f46d 100644 --- a/examples/fancy-ui/src/frame.rs +++ b/examples/fancy-ui/src/frame.rs @@ -329,6 +329,13 @@ where ".hidden" : { visibility: "hidden", }, + + "button": { + white_space: "nowrap", + clip_path: "polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%)", + width: px(400), + height: px(40), + }, }; vec![main, Self::border_style(), Self::corner_style()] diff --git a/examples/fancy-ui/src/lib.rs b/examples/fancy-ui/src/lib.rs index ad6b0ba8..d16f95d4 100644 --- a/examples/fancy-ui/src/lib.rs +++ b/examples/fancy-ui/src/lib.rs @@ -66,7 +66,8 @@ impl Application for App { font_size: px(40), padding: px(30), margin: px(30), - } + }, + }]; main