-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
introduce .cancel class to quit modal windows #288
Comments
This seems like a great addition to me. I spent a bit figuring how to do this given the current documentation. |
We'll revisit this in the next release. One idea is making all classes that control behavior prefaced with Thoughts? |
@markdotto +1 |
Mark: Sounds good to me! |
in 2.0-wip we're now relying more heavily on data-attributes in an attempt to decouple styles and javascript behavior. So to add close behavior you would just add |
Yes, that sounds great and a lot better than having to use classes all around. Looking forward to 2.0 |
In the modal window example there are two buttons, a
primary
button, usually linked to the action the modal warns/informs you about, and asecondary
button, which is most widely known as thecancel
button.The modal window also has a button named
×
to close the modal window.My question is, shouldn't there be an easy way to make the
secondary
button (or any button/element really) behave the same as the×
link?Right now this action is provided by the
.close
class, but this class inherits a lot of styling which messes with thebtn
class on thesecondary
button.To overcome this problem, we could nintroduce a
.cancel
class, which inherits o styling, but instead is used in the following modal javascript code:I realize the same can be achieved with some extra javascript, but I reckon this is an often applied situation which should be made as simple as possible.
The text was updated successfully, but these errors were encountered: