Templarian / ui.bootstrap.contextMenu

AngularJS Bootstrap UI Context Menu
MIT License
259 stars 127 forks source link

add custom css class support #65

Closed alexmaze closed 8 years ago

alexmaze commented 8 years ago

How about to support an custom css class to root element of context menu?

<div context-menu="menuOptions" context-menu-class="custom_class"></div>
josetaira commented 8 years ago
.testCustomClass {
  background-color: red;
}

This is how it looks like: ui-bootstrap-contextmenu-custom-class

It doesn't seem to be applying it to the top element, but to the background instead. Also, I'm not sure how beneficial this would be since any style in the class you'd add in here can also be added through the base class angular-bootstrap-contextmenu

alexmaze commented 8 years ago

I mean if we can add an custom css class to root element we can have different styles of context menus in one page. for example:

<img context-menu="imgMenuOptions" context-menu-class="img-context-menu"></img>
<p context-menu="textMenuOptions" context-menu-class="text-context-menu"></p>
.img-context-menu {
  // one style
}

.text-context-menu {
  // another style
}

if adding styles to angular-bootstrap-contextmenu, it can't separate the two kind of menu

Thanks, alex