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

[feature] support for button 'pressed' state #36

Closed
morenoh149 opened this issue Sep 24, 2014 · 2 comments
Closed

[feature] support for button 'pressed' state #36

morenoh149 opened this issue Sep 24, 2014 · 2 comments

Comments

@morenoh149
Copy link

I need buttons that have boolean state (on|off). After doing research the :active state is unsuitable for this http://stackoverflow.com/questions/12960068/keep-css-active-state-after-click-with-jquery more preferable is to add an .active class. Then in jquery you can do $('button').toggleClass('active') upon click. I just tried this out on my local build, all I had to do in the css is to replace every instance of :active to .active. I propose this library drop support for :active and switch over to using a class.

@alexwolfe
Copy link
Owner

:active is a pseudo class that happens when a user is clicking on a button. We won't be removing this state but rather adding a .active or .is-active class to the button so that you can use jquery to toggle the state programatically.

@alexwolfe
Copy link
Owner

@morenoh149 I just pushed this change to the repo, it will be avaialble on the builder soon.

To use it simply add .is-active or .active class to any button. Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants