Conversation
…to the secondary button. From his tweet to me, I think @mdo is a fan of providing a cancel button in the dialog. If that's a best practice, maybe it should be in the docs? (Or if you think cancel buttons are overkill, then that's cool. Your call).
|
Ah it's not so easy, as then the button gets all the 'close' CSS. I've added a 'close-button' class to my HTML and the modal JS for now. It could also look for button type="reset" as indication of a cancel button..but that might be presuming too much. |
|
A good practice I've started to adopt elsewhere is .js-* for the behavior class. This helps remove the behavior changes of javascript from the display of CSS. Thoughts? |
|
Ah, so what you're saying is that there'd be a "js-close" class and that'd apply both to the cancel button and to the 'X'? (in addition to other classes on them). That makes sense, though you'd probably want to check that system makes sense for all the JS libs. |
|
+1 to use some prefix for JS related functionalities. |
|
Hm... think we're going to stick to a data-attribute driven pubsub model. Going to close this. |
I realized you can easily make a cancel button by adding close class to the secondary button. From his tweet to me, I think @mdo is a fan of providing a cancel button in the dialog. If that's a best practice, maybe it should be in the docs? (Or if you think cancel buttons are overkill, then that's cool. Your call).