james-elliott commented on code in PR #8480:
URL: https://github.com/apache/nifi/pull/8480#discussion_r1520426195


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/assets/themes/nifi.scss:
##########
@@ -19,11 +19,15 @@
 // For more information: 
https://m2.material.io/design/color/the-color-system.html
 @use '@angular/material' as mat;
 
+// Define some variables that are re-used throughout the theme.
+$on-surface-dark: rgba(black, 0.87);
+$on-surface-light: #ffffff;
+
 // The $material-primary-light-palette define the PRIMARY AND ACCENT palettes 
for all Angular Material components used throughout Apache NiFi
 $material-primary-light-palette: (
     // 50 -> 900 are the PRIMARY colors 
(mat.define-palette($material-primary-light-palette, 300);) defined by 
https://m2.material.io/design/color/the-color-system.html#tools-for-picking-colors
 for primary color #728e9b
-    50: rgba(249, 250, 251, 0.97), // .context-menu
-    100: rgba(233, 239, 243, 1), // "lighter" hue for this palette. Also 
.global-menu:hover, .navigation-control-header:hover, 
.operation-control-header:hover, .new-canvas-item.icon.hovering, table 
tr:hover, .CodeMirror.blank, .remote-banner, .process-group-details-banner, 
.process-group-details-banner, remote-process-group-details-banner, 
.remote-process-group-last-refresh-rect,

Review Comment:
   Color should support rgb, hex, and keywords. The 3 value versions of rgb 
`rgb(0,0,0)` and hex `#000000` are considered shorthand where the 4th value, 
alpha, is intuited at full. We can always declare a color and alpha explicitly. 
For instance, we could use rgba(0,0,0,0.87) for $on-surface-dark or we could 
define it as #000000de.
   
   I believe all modern browsers support hsla() as well. However, not too many 
folks use that as a way to define color. I'm pretty confident that hex 
declarations are the most used. However, having alpha channel defined by a hex 
is a little awkward and unfamiliar. I'd suggest, if we are going to 
standardize, to go with a format like `rgba(#000000, 0.87)`. That also works in 
all browsers, and combines the familiarity of hexes for the color, with 
percentage of transparency.



-- 
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: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to