From 5cac174f4a7dba1373233d10c2c1de484f4b21b3 Mon Sep 17 00:00:00 2001 From: thsparks Date: Fri, 7 Mar 2025 12:54:36 -0800 Subject: [PATCH 1/9] Use foreground color for buttons in the common editor toggle. This is generally up against a slightly faded background, in which case foreground is going to be the most visible. Fixes an issue in the share -> embed toggle. --- react-common/styles/controls/EditorToggle.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-common/styles/controls/EditorToggle.less b/react-common/styles/controls/EditorToggle.less index ad724bcbf649..e1b973acd14d 100644 --- a/react-common/styles/controls/EditorToggle.less +++ b/react-common/styles/controls/EditorToggle.less @@ -37,7 +37,7 @@ & > .common-button { background: none; - color: var(--pxt-neutral-background1); + color: var(--pxt-neutral-foreground1); transition: color .25s; margin: 0; width: 100%; From e0c8268566a1d9b3204ad311ecc61a2cb5720be3 Mon Sep 17 00:00:00 2001 From: thsparks Date: Fri, 7 Mar 2025 13:14:45 -0800 Subject: [PATCH 2/9] Fix foreground for extension card "extra content" (which to my knowledge, is only used for user-provided extension disclaimer. --- react-common/styles/extensions/ExtensionCard.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-common/styles/extensions/ExtensionCard.less b/react-common/styles/extensions/ExtensionCard.less index 26071e77451d..2eca0873055d 100644 --- a/react-common/styles/extensions/ExtensionCard.less +++ b/react-common/styles/extensions/ExtensionCard.less @@ -51,7 +51,7 @@ border-top: solid 1px var(--pxt-neutral-stencil1); flex-shrink: 0; font-size: 16px; - color: var(--pxt-secondary-background); + color: var(--pxt-neutral-foreground1); overflow: hidden; border-bottom-left-radius: 0.5rem; From 2f4b75c1db6b68d23cb03ffc52485c8ff544971a Mon Sep 17 00:00:00 2001 From: thsparks Date: Fri, 7 Mar 2025 13:43:38 -0800 Subject: [PATCH 3/9] Add alpha 80 and use for foreground of card description content. --- react-common/styles/theming/base-theme.less | 1 + theme/color-themes/high-contrast.json | 1 + theme/semantic-ui-overrides.less | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/react-common/styles/theming/base-theme.less b/react-common/styles/theming/base-theme.less index 0bfdd5209e63..39ecf5de3ab4 100644 --- a/react-common/styles/theming/base-theme.less +++ b/react-common/styles/theming/base-theme.less @@ -65,6 +65,7 @@ --pxt-neutral-alpha10: rgba(0, 0, 0, 0.1); --pxt-neutral-alpha20: rgba(0, 0, 0, 0.2); --pxt-neutral-alpha50: rgba(0, 0, 0, 0.5); + --pxt-neutral-alpha80: rgba(0, 0, 0, 0.8); --pxt-link: #3977B4; --pxt-link-hover: #204467; diff --git a/theme/color-themes/high-contrast.json b/theme/color-themes/high-contrast.json index beeaf3924832..febcfcd07ac6 100644 --- a/theme/color-themes/high-contrast.json +++ b/theme/color-themes/high-contrast.json @@ -73,6 +73,7 @@ "pxt-neutral-alpha10": "rgba(255, 255, 255, 0.1)", "pxt-neutral-alpha20": "rgba(255, 255, 255, 0.2)", "pxt-neutral-alpha50": "rgba(255, 255, 255, 0.5)", + "pxt-neutral-alpha80": "rgba(255, 255, 255, 0.8)", "pxt-link": "#807FFF", "pxt-link-hover": "#1b19ff", diff --git a/theme/semantic-ui-overrides.less b/theme/semantic-ui-overrides.less index 901f9e8b3288..f0c61987b638 100644 --- a/theme/semantic-ui-overrides.less +++ b/theme/semantic-ui-overrides.less @@ -82,7 +82,7 @@ body.pxt-theme-root { } .description { - color: var(--pxt-neutral-alpha50); + color: var(--pxt-neutral-alpha80); } } From 88bfd9f2cea381cd72a89c481e678ef82d47b49b Mon Sep 17 00:00:00 2001 From: thsparks Date: Fri, 7 Mar 2025 14:46:16 -0800 Subject: [PATCH 4/9] Remove inverted class from new asset buttons. They aren't needed since both foreground and background get set anyway (and they're causing the colors to get overriden in dark theme) --- webapp/src/components/assetEditor/assetGallery.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/src/components/assetEditor/assetGallery.tsx b/webapp/src/components/assetEditor/assetGallery.tsx index dc354fa5ced5..6e7f9763fbfb 100644 --- a/webapp/src/components/assetEditor/assetGallery.tsx +++ b/webapp/src/components/assetEditor/assetGallery.tsx @@ -121,7 +121,7 @@ class AssetGalleryImpl extends React.Component
-