ocombe / ocModal

An angularJS modal directive & service
66 stars 16 forks source link

CSS classes are too generic #10

Open cmiller86 opened 8 years ago

cmiller86 commented 8 years ago

ocModal is using generic css classes like .modal which overrides the default rules for all modals. Prepending oc- on the classes would avoid class conflicts.

ocombe commented 8 years ago

True, but the idea was to make it work with bootstrap when I made it (and bootstrap uses .modal). It could be a config param to make it add the modal class when using bootstrap (or not).

cmiller86 commented 8 years ago

It currently causes an issue if you have any other bootstrap modals on the page. I have existing modals that are display none but the css for ocModal changes their display to block so they're no longer hidden. Ideally, the ocModal's modal html would use something like class="modal oc-modal" with the custom css targeted at the oc-modal class instead of the default bootstrap class. Bootstrap's .modal class default is display: hidden.

benjamincharity commented 8 years ago

Ideally, the ocModal's modal html would use something like class="modal oc-modal" with the custom css targeted at the oc-modal class instead of the default bootstrap class.

Definitely agree with @cmiller86 on this. Unless this library depends on Bootstrap, it seems there should be a separation of concerns.

(Freaking love this library btw!)