scottyaslan commented on code in PR #11159:
URL: https://github.com/apache/nifi/pull/11159#discussion_r3164013376


##########
nifi-frontend/src/main/frontend/libs/shared/src/components/multi-select-option/multi-select-option.component.scss:
##########
@@ -0,0 +1,103 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+@use '@angular/material' as mat;
+
+// Forward --mat-option-* CSS custom properties onto multi-select-option 
elements.
+// mat.theme() only emits system-level --mat-sys-* tokens; component-specific 
tokens
+// need to be set explicitly for custom elements that extend MatOption.
+multi-select-option {
+    @include mat.option-overrides(
+        (
+            hover-state-layer-color: color-mix(
+                    in srgb,
+                    var(--mat-sys-on-surface) 
calc(var(--mat-sys-hover-state-layer-opacity) * 100%),
+                    transparent
+                ),
+            focus-state-layer-color: color-mix(
+                    in srgb,
+                    var(--mat-sys-on-surface) 
calc(var(--mat-sys-focus-state-layer-opacity) * 100%),
+                    transparent
+                ),
+            selected-state-layer-color: var(--mat-sys-secondary-container),
+            selected-state-label-text-color: 
var(--mat-sys-on-secondary-container),
+            label-text-color: var(--mat-sys-on-surface)
+        )
+    );
+}
+
+.multi-select-option {
+    display: flex;
+    flex-direction: row;
+
+    .mat-pseudo-checkbox {
+        height: 16px;
+        width: 16px;
+        margin-left: 4px;
+        --mat-pseudo-checkbox-minimal-selected-checkmark-color: var(
+            --mat-option-selected-state-label-text-color,
+            var(--mat-sys-on-secondary-container)
+        );
+    }
+

Review Comment:
   The checkmark is not the correct color when the keyboard focus is applied to 
the selected option:
   
   <img width="1086" height="338" alt="Image" 
src="https://github.com/user-attachments/assets/53469ec5-4be8-4a0e-94e8-4c13da0d0a99";
 />
   
   ```suggestion
       // When hover/focus/active overrides the selected background, revert the 
checkmark
       // to the regular label color so it remains visible against the state 
layer.
       &:hover .mat-pseudo-checkbox,
       &:focus .mat-pseudo-checkbox,
       &.mat-mdc-option-active .mat-pseudo-checkbox {
           --mat-pseudo-checkbox-minimal-selected-checkmark-color: var(
               --mat-option-label-text-color,
               var(--mat-sys-on-surface)
           );
       }
   
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to