From 74dc3e715c3c1e3cdb17d57e8ac3bce81ac052f2 Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Tue, 3 Sep 2024 14:21:39 +0200 Subject: [PATCH] fix: Apply padding to Snaps UI root element no matter the type (#26850) ## **Description** Fixes a problem where padding would not be applied correctly to the first child of the Snaps UI container. We were expecting all root elements to be `div`. But many different types of components are allowed at the root. Quick fix by applying the padding no matter what type the root element is. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/26850?quickstart=1) ## **Screenshots/Recordings** ### **Before** ![image](https://github.com/user-attachments/assets/4a6680cc-137b-419d-8265-52345d4414cc) ### **After** ![image](https://github.com/user-attachments/assets/8655005b-f37b-44eb-8624-3f6e75250051) --- ui/components/app/snaps/snap-ui-renderer/index.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/components/app/snaps/snap-ui-renderer/index.scss b/ui/components/app/snaps/snap-ui-renderer/index.scss index 354efe794602..9df749ce1019 100644 --- a/ui/components/app/snaps/snap-ui-renderer/index.scss +++ b/ui/components/app/snaps/snap-ui-renderer/index.scss @@ -4,7 +4,7 @@ } &__container { - & > div:first-child { + & > *:first-child { padding: 16px; } }