Skip to content

Commit

Permalink
Hard code editor toggle in scenarios where background is also hard-coded
Browse files Browse the repository at this point in the history
  • Loading branch information
thsparks committed Feb 26, 2025
1 parent 0ff8296 commit 965e660
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions theme/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -2651,6 +2651,30 @@ button.ui.button.hostmultiplayergame-button {
}
}

#blocks-editor-field-div,
.sound-effect-editor-widget {
// Header colors are hard-coded for field editors, so hard-code the toggle
// colors as well to ensure good contrast.
.common-editor-toggle {
border: 3px solid rgba(52, 73, 94, .2);
background: rgba(52, 73, 94, .4);

.common-editor-toggle-item {
&> .common-button {
color: #fff;
}

&.selected > .common-button {
color: #323130;
}
}

.common-editor-toggle-handle {
background: #fff;
}
}
}

.blocks-editor-field-overlay {
position: absolute;
z-index: @blocklyWidgetDivZIndex;
Expand Down
2 changes: 1 addition & 1 deletion theme/soundeffecteditor.less
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
justify-content: center;
align-items: center;

background-color: var(--pxt-primary-background);
background-color: #e30fc0; // Matches block color

& > .common-button {
position: absolute;
Expand Down

0 comments on commit 965e660

Please sign in to comment.