Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1664 In dark mode, comments displayed with white background #1665

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
margin: 5px 0 0 5px;
cursor: pointer;
&.white-0 {
background-color: $white-0;
background-color: $ui-01; // In dark-mode, white-0 will be interpreted as black.
border: 1px solid $gray-50;
}
&.yellow-20 { background-color: $yellow-20; }
Expand Down
34 changes: 19 additions & 15 deletions canvas_modules/common-canvas/src/common-canvas/svg-canvas-d3.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ $node-port-input-arrow-connected-fill-color: transparent;
// Comment colors
$comment-outline-color: $active-light-ui;
$comment-outline-hover-color: $inverse-hover-ui;
$comment-fill-color: $white-0;
$comment-text-color: $gray-100;
$comment-fill-color: $ui-01;
$comment-text-color: $text-01;

// Comment properties
$comment-text-font-size: 12px;
Expand Down Expand Up @@ -631,10 +631,13 @@ $link-highlight-color: $support-04;
user-select: none;
}

@mixin d3-comment-color-overrides($background-color) {
@mixin d3-comment-color-overrides($background-color, $text-color) {
.d3-comment-rect {
fill: $background-color;
}
.d3-comment-text {
color: $text-color;
}
.d3-comment-entry {
background-color: $background-color;
color: $gray-100;
Expand All @@ -647,40 +650,41 @@ $link-highlight-color: $support-04;
// assumption is, the user would prefer the color they set in the UI to
// override any color provided by the host app.
g.bkg-col-white-0 {
@include d3-comment-color-overrides($white-0);
// In dark-mode, white-0 will be interpreted as black background with white text.
@include d3-comment-color-overrides($ui-01, $text-01);
}
g.bkg-col-yellow-20 {
@include d3-comment-color-overrides($yellow-20);
@include d3-comment-color-overrides($yellow-20, $gray-100);
}
g.bkg-col-gray-20 {
@include d3-comment-color-overrides($gray-20);
@include d3-comment-color-overrides($gray-20, $gray-100);
}
g.bkg-col-green-20 {
@include d3-comment-color-overrides($green-20);
@include d3-comment-color-overrides($green-20, $gray-100);
}
g.bkg-col-teal-20 {
@include d3-comment-color-overrides($teal-20);
@include d3-comment-color-overrides($teal-20, $gray-100);
}
g.bkg-col-cyan-20 {
@include d3-comment-color-overrides($cyan-20);
@include d3-comment-color-overrides($cyan-20, $gray-100);
}
g.bkg-col-red-50 {
@include d3-comment-color-overrides($red-50);
@include d3-comment-color-overrides($red-50, $gray-100);
}
g.bkg-col-orange-40 {
@include d3-comment-color-overrides($orange-40);
@include d3-comment-color-overrides($orange-40, $gray-100);
}
g.bkg-col-gray-50 {
@include d3-comment-color-overrides($gray-50);
@include d3-comment-color-overrides($gray-50, $gray-100);
}
g.bkg-col-green-50 {
@include d3-comment-color-overrides($green-50);
@include d3-comment-color-overrides($green-50, $gray-100);
}
g.bkg-col-teal-50 {
@include d3-comment-color-overrides($teal-50);
@include d3-comment-color-overrides($teal-50, $gray-100);
}
g.bkg-col-cyan-50 {
@include d3-comment-color-overrides($cyan-50);
@include d3-comment-color-overrides($cyan-50, $gray-100);
}

.d3-comment-selection-highlight {
Expand Down
Loading