Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Add .hover class for force button hover appearance #128

Closed
cosay opened this issue Sep 15, 2020 · 11 comments
Closed

Add .hover class for force button hover appearance #128

cosay opened this issue Sep 15, 2020 · 11 comments
Assignees
Labels
buttons Changes or fixes to buttons enhancement New feature or request question Further information is requested stale-issue Issue that is inactive

Comments

@cosay
Copy link

cosay commented Sep 15, 2020

:hover is not trusted attribute so You can't set it programmatically (ex. using JS).
We can add a CSS class to handle this state.
It can be used for button hover animation, for triggering from another hover, etc.

This solution is used, for example, in bootstrap buttons (.active class).

If you think the idea is good, I can work on it. Just assign me :)

@cosay cosay added the enhancement New feature or request label Sep 15, 2020
@shahednasser
Copy link
Collaborator

I'm not sure I understand exactly what the issue is. Can you please elaborate more? Where can the issue be found or what is needed to be changed or fixed

@cosay
Copy link
Author

cosay commented Sep 16, 2020

This is a new feature. I would like to add a css .hover class for each button that has a :hover state.
This will allow you to change the button hover state using Javascript.

@cosay
Copy link
Author

cosay commented Sep 16, 2020

Example:

To every :hover pseudo-class like this:

&:hover {
    animation: pulse 1s infinite;
}

I would like to add a class .hover

&:hover,
&.hover {
    animation: pulse 1s infinite;
}

@shahednasser
Copy link
Collaborator

I'm not really sure what the purpose of this would be honestly. Plus, this would mean that we would have to add Javascript to the button's functionalities as well (i.e. if someone would use them, they would have to download the css and javascript).

@cosay
Copy link
Author

cosay commented Sep 16, 2020

No, we just add one class in CSS for each button (.hover class).
I will prepare an example to present what exactly is going on :)

@shahednasser shahednasser added the question Further information is requested label Sep 17, 2020
@GoodnessOlawoore
Copy link

I think I understand this, kindly assign it to me.

@shahednasser shahednasser added the buttons Changes or fixes to buttons label Sep 23, 2020
@GoodnessOlawoore
Copy link

I think I understand this, kindly assign it to me.

Thank you @shahednasser , I will work on it

@github-actions
Copy link

github-actions bot commented Oct 3, 2020

@shahednasser reporting a stale issue.

@github-actions github-actions bot added the stale-issue Issue that is inactive label Oct 3, 2020
@shahednasser
Copy link
Collaborator

@GoodnessOlawoore any update on this?

@cosay
Copy link
Author

cosay commented Oct 3, 2020

@GoodnessOlawoore any update on this?

I'll do it today :)

@cosay
Copy link
Author

cosay commented Oct 3, 2020

But not yet added for all buttons.
I will try to finish tomorrow :)

Example how to use this feature:
https://jsfiddle.net/cosay/3okb8rs0/

@shahednasser shahednasser linked a pull request Oct 7, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
buttons Changes or fixes to buttons enhancement New feature or request question Further information is requested stale-issue Issue that is inactive
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants