From 47a661354190984facd29dbbd0de2b7fbf2d6ccf Mon Sep 17 00:00:00 2001 From: Sukaato Date: Wed, 18 Sep 2024 23:54:54 +0200 Subject: [PATCH] fix(core): apply correct padding move css to card-body, can not work if multiple card are nested fixes: #36 --- .../src/components/card-body/card-body.scss | 4 ++ .../card-body/tests/basic/index.html | 52 +++++++++++++++++++ packages/core/src/components/card/card.scss | 6 --- 3 files changed, 56 insertions(+), 6 deletions(-) create mode 100644 packages/core/src/components/card-body/tests/basic/index.html diff --git a/packages/core/src/components/card-body/card-body.scss b/packages/core/src/components/card-body/card-body.scss index c145fa3..0773eb6 100644 --- a/packages/core/src/components/card-body/card-body.scss +++ b/packages/core/src/components/card-body/card-body.scss @@ -18,3 +18,7 @@ flex-grow: 1; } } + +:host-context(pop-card[compact]) { + --padding: 16px; +} diff --git a/packages/core/src/components/card-body/tests/basic/index.html b/packages/core/src/components/card-body/tests/basic/index.html new file mode 100644 index 0000000..1622945 --- /dev/null +++ b/packages/core/src/components/card-body/tests/basic/index.html @@ -0,0 +1,52 @@ + + + + + + Input Basic | Poppy-ui + + + + + + +
+
+

Card - basic

+ + + content + + +
+
+

Card - compact

+ + + content + + +
+
+ + \ No newline at end of file diff --git a/packages/core/src/components/card/card.scss b/packages/core/src/components/card/card.scss index 5300cb9..14ece11 100644 --- a/packages/core/src/components/card/card.scss +++ b/packages/core/src/components/card/card.scss @@ -21,9 +21,3 @@ background-color: var(--background); color: var(--color); } - -:host([compact]) { - :where(pop-card-body) { - --padding: 16px; - } -}