Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
281 stars 77 forks source link

[Action] Evaluate need to provide an alternative style for `active` state #5003

Open geospatialem opened 2 years ago

geospatialem commented 2 years ago

Description

One of three issues stemmed from #4813.

Determine if there is a need for differing styles to further emphasize an active state. Currently a light gray state is provided in light mode, and dark gray for dark mode. Could additional context be provided to users?

example-with-action-1 example-with-action-2

Acceptance Criteria

Relevant Info

This issue surfaced from discussion of the action component, which has a similar appearance when in an active state that is depicted on the :focus/:active/:hover states.

So it isn't clear if the active state is true, or not when focused. While the indicator attribute can be used alongside, there should be more visual prominence that the action is in an :active state.

cc @macandcheese

Which Component

Specifically with action, but could impact other components.

Example Use Case

Example with action: https://codepen.io/geospatialem/pen/QWmWdoQ.

macandcheese commented 2 years ago

Note: explore if a "subtle" and "loud" (... with better names) could work, or if a single state such as the bordered example above is best. Note that users can always customize both the indicator and the action active state through css vars, so that may be a justification for a single one)...

webmapLee commented 2 years ago
const action = document.querySelector('calcite-action').shadowRoot
action.querySelector('.button').setAttribute('style','padding:0.5em;')

is it can help?

ashetland commented 1 year ago

Also to explore: using foreground-current for the active state