Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obsolete css class in secondary button #5262

Open
mxmrtns opened this issue Feb 23, 2024 · 4 comments
Open

Obsolete css class in secondary button #5262

mxmrtns opened this issue Feb 23, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@mxmrtns
Copy link
Contributor

mxmrtns commented Feb 23, 2024

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 mxmrtns added the bug Something isn't working label Feb 23, 2024
@mxmrtns mxmrtns assigned mxmrtns and tobiu and unassigned mxmrtns Feb 23, 2024
@tobiu
Copy link
Collaborator

tobiu commented Feb 23, 2024

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

@mxmrtns
Copy link
Contributor Author

mxmrtns commented Feb 23, 2024

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

@tobiu @ExtAnimal

@tobiu
Copy link
Collaborator

tobiu commented Feb 23, 2024

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.

@mxmrtns
Copy link
Contributor Author

mxmrtns commented Feb 23, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants