Esri / calcite-colors

Esri's official color documentation repository that is leveraged by Calcite and all other Esri initiatives.
https://esri.github.io/calcite-colors/
Other
26 stars 6 forks source link

feat: add text highlight colors #79

Closed eriklharper closed 1 year ago

eriklharper commented 1 year ago

This PR adds 2 new Sass variables for light and dark versions of text highlight colors and a corresponding CSS variable defined by @ashetland 's Input Time designs.

These colors are needed because currently all browsers at the time of writing lack true support for utilizing native OS system level highlight color settings in web components, which was Aaron's original intention when he designed the Input Time component with its native-like text highlight background colors shown below.

Related Calcite Issue: https://github.com/Esri/calcite-components/issues/2709

image https://www.figma.com/file/vokzyw9EJGCkHzd3zHs0le/Input-Time-%5Benhancement%5D-%5Bissue-%232709%5D?node-id=18%3A2&t=iZGOw9yKtd7u10dT-0

macandcheese commented 1 year ago

Does this mean that if I as a user have set an accent color, for instance in Mac OS System Preferences, it won’t be honored in the way it is for a native input?

(A question more so on the CC side, not this color variable itself.)

eriklharper commented 1 year ago

Does this mean that if I as a user have set an accent color, for instance in Mac OS System Preferences, it won’t be honored in the way it is for a native input?

(A question more so on the CC side, not this color variable itself.)

100% correct. I've looked into this, even asked in W3C forums. It is currently not possible in any browser to retrieve this system-level preference setting, even the native platform ones like Safari.

eriklharper commented 1 year ago

Can we update $ui-text-highlight-dark to #375F95

@ashetland Done. :)