neo icon indicating copy to clipboard operation
neo copied to clipboard

Obsolete css class in secondary button

Open mxmrtns opened this issue 1 year ago • 4 comments

Is this class obsolete? I couldn't figure out what it does as we also have a :active class, which should cover the use case of 'pressed'

https://github.com/neomjs/neo/blob/f5f8bfce6f6daa95c1c77eda8b41bd414dc71225/resources/scss/src/button/Base.scss#L257C1-L259C10

mxmrtns avatar Feb 23 '24 09:02 mxmrtns

Hi Max,

i think we need both, active & pressed states.

one state indicates a mousedown or tap event, the other one indicates an active item.

think of tab header buttons (active tab) or button toggle groups, where one button can be pressed to indicate a navigation state.

@ExtAnimal

tobiu avatar Feb 23 '24 09:02 tobiu

I don't see how there is a difference. :active = mousedown / tap or not?

@tobiu @ExtAnimal

mxmrtns avatar Feb 23 '24 09:02 mxmrtns

take a look at this one: http://localhost:8080/examples/tab/container/

the "selected" tab header looks different inside the dark theme. a click triggers the ripple effect, but it could just be a different css rule.

tobiu avatar Feb 23 '24 09:02 tobiu

I think I know what you mean and I think we need to align on some semantics

:active pseudo-class represents an element (such as a button) that is being activated by the user. When using a mouse, "activation" typically starts when the user presses down the primary mouse button. (from mdn docs)

pressed is no actual HTML state and just means the same as :active

selected is what you are referring to in your Tab-Header button. Also it is just a semantic state and not actual HTML

:focus pseudo-class represents an element (such as a form input) that has received focus. It is generally triggered when the user clicks or taps on an element or selects it with the keyboard's Tab key. (from mdn docs)

From my perspective a regular button ... ... can be active (which is the equivalent to being pressed) ... can be focused ... cannot be selected

@tobiu @ExtAnimal

mxmrtns avatar Feb 23 '24 09:02 mxmrtns

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Aug 29 '24 02:08 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Sep 12 '24 02:09 github-actions[bot]