From d2ecc6843bf3d0ac3d67afd6e778a271cb7836c4 Mon Sep 17 00:00:00 2001 From: Brandy Smith <6577830+brandyscarney@users.noreply.github.com> Date: Wed, 5 Nov 2025 10:30:05 -0500 Subject: [PATCH] refactor(card): convert styles to shadow TODO font size does not work due to global styles --- .../card-content/card-content.ionic.scss | 8 +-- .../card-content/card-content.ios.scss | 60 ++++++++--------- .../card-content/card-content.md.scss | 66 +++++++++---------- 3 files changed, 67 insertions(+), 67 deletions(-) diff --git a/core/src/components/card-content/card-content.ionic.scss b/core/src/components/card-content/card-content.ionic.scss index 4e91504ec9..6bb1e96568 100644 --- a/core/src/components/card-content/card-content.ionic.scss +++ b/core/src/components/card-content/card-content.ionic.scss @@ -13,8 +13,8 @@ flex-direction: column; gap: globals.$ion-space-400; - - img { - @include globals.margin(globals.$ion-space-200, 0, globals.$ion-space-200, 0); - } +} + +::slotted(img) { + @include globals.margin(globals.$ion-space-200, 0, globals.$ion-space-200, 0); } diff --git a/core/src/components/card-content/card-content.ios.scss b/core/src/components/card-content/card-content.ios.scss index d8cafc28c1..51dc074b5e 100644 --- a/core/src/components/card-content/card-content.ios.scss +++ b/core/src/components/card-content/card-content.ios.scss @@ -10,34 +10,34 @@ font-size: $card-ios-font-size; line-height: 1.4; - - h1 { - @include margin(0, 0, 2px); - - font-size: dynamic-font(24px); - font-weight: normal; - } - - h2 { - @include margin(2px, 0); - - font-size: dynamic-font(16px); - font-weight: normal; - } - - h3, - h4, - h5, - h6 { - @include margin(2px, 0); - - font-size: dynamic-font(14px); - font-weight: normal; - } - - p { - @include margin(0, 0, 2px); - - font-size: dynamic-font(14px); - } +} + +::slotted(h1) { + @include margin(0, 0, 2px); + + font-size: dynamic-font(24px); + font-weight: normal; +} + +::slotted(h2) { + @include margin(2px, 0); + + font-size: dynamic-font(16px); + font-weight: normal; +} + +::slotted(h3), +::slotted(h4), +::slotted(h5), +::slotted(h6) { + @include margin(2px, 0); + + font-size: dynamic-font(14px); + font-weight: normal; +} + +::slotted(p) { + @include margin(0, 0, 2px); + + font-size: dynamic-font(14px); } diff --git a/core/src/components/card-content/card-content.md.scss b/core/src/components/card-content/card-content.md.scss index 2de1cae70c..f8d123f5e9 100644 --- a/core/src/components/card-content/card-content.md.scss +++ b/core/src/components/card-content/card-content.md.scss @@ -10,37 +10,37 @@ font-size: $card-md-font-size; line-height: $card-md-line-height; - - h1 { - @include margin(0, 0, 2px); - - font-size: dynamic-font(24px); - font-weight: normal; - } - - h2 { - @include margin(2px, 0); - - font-size: dynamic-font(16px); - font-weight: normal; - } - - h3, - h4, - h5, - h6 { - @include margin(2px, 0); - - font-size: dynamic-font(14px); - font-weight: normal; - } - - p { - @include margin(0, 0, 2px); - - font-size: dynamic-font(14px); - font-weight: normal; - - line-height: 1.5; - } +} + +::slotted(h1) { + @include margin(0, 0, 2px); + + font-size: dynamic-font(24px); + font-weight: normal; +} + +::slotted(h2) { + @include margin(2px, 0); + + font-size: dynamic-font(16px); + font-weight: normal; +} + +::slotted(h3), +::slotted(h4), +::slotted(h5), +::slotted(h6) { + @include margin(2px, 0); + + font-size: dynamic-font(14px); + font-weight: normal; +} + +::slotted(p) { + @include margin(0, 0, 2px); + + font-size: dynamic-font(14px); + font-weight: normal; + + line-height: 1.5; }