From 379b8a31a948ecb5260634ab6e347551d4585b50 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Tue, 1 Nov 2022 10:01:13 +0000 Subject: [PATCH] Refactor #3498 --- components/lib/toast/Toast.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/lib/toast/Toast.css b/components/lib/toast/Toast.css index 5825db668f..5e47150be9 100644 --- a/components/lib/toast/Toast.css +++ b/components/lib/toast/Toast.css @@ -1,8 +1,7 @@ .p-toast { position: fixed; - width: 100%; + width: calc(100% - var(--toast-indent, 0px)); max-width: 25rem; - padding-left: 2rem; } .p-toast-message-content { @@ -19,21 +18,25 @@ } .p-toast-top-right { + --toast-indent: 20px; top: 20px; right: 20px; } .p-toast-top-left { + --toast-indent: 20px; top: 20px; left: 20px; } .p-toast-bottom-left { + --toast-indent: 20px; bottom: 20px; left: 20px; } .p-toast-bottom-right { + --toast-indent: 20px; bottom: 20px; right: 20px; }