From 960c3b62ae310178f1c8fe092578ba5f836765bc Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Tue, 19 Nov 2024 17:46:19 -0500 Subject: [PATCH] feat(theming): add support for bold and subtle as maps --- core/src/components/button/button.ionic.scss | 17 +- .../components/button/test/basic/index.html | 215 +++++++++--------- core/src/themes/functions.color.scss | 81 +++++-- .../src/themes/ionic/ionic.theme.default.scss | 153 +++++++++---- .../themes/native/native.theme.default.scss | 90 +++++--- 5 files changed, 349 insertions(+), 207 deletions(-) diff --git a/core/src/components/button/button.ionic.scss b/core/src/components/button/button.ionic.scss index 2650cabdf4..e790d1a34b 100644 --- a/core/src/components/button/button.ionic.scss +++ b/core/src/components/button/button.ionic.scss @@ -53,8 +53,9 @@ } :host(.button-solid.button-subtle) { - --background: #{globals.ion-color(primary, subtle)}; - --color: #{globals.ion-color(primary, base)}; + --background: #{globals.ion-color(primary, base, $subtle: true)}; + --background-activated: #{globals.ion-color(primary, shade, $subtle: true)}; + --color: #{globals.ion-color(primary, contrast, $subtle: true)}; } // Outline Button @@ -87,8 +88,16 @@ // ------------------------------------------------------------------------------- :host(.button-solid.button-subtle.ion-color) .button-native { - background: globals.current-color(subtle); - color: globals.current-color(base); + background: globals.current-color(base, $subtle: true); + color: globals.current-color(contrast, $subtle: true); +} + +:host(.button-solid.button-subtle.ion-color.ion-activated) .button-native::after { + background: globals.current-color(shade, $subtle: true); +} + +:host(.button-solid.button-subtle.ion-color.ion-focused) .button-native::after { + background: globals.current-color(tint, $subtle: true); } :host(.button-solid.ion-color) ion-ripple-effect { diff --git a/core/src/components/button/test/basic/index.html b/core/src/components/button/test/basic/index.html index 3976c6abf1..4f1283d5f8 100644 --- a/core/src/components/button/test/basic/index.html +++ b/core/src/components/button/test/basic/index.html @@ -14,6 +14,11 @@