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

nguibs-modal in a namespaced distrib #46

Closed
lucienbertin opened this issue Oct 27, 2015 · 2 comments
Closed

nguibs-modal in a namespaced distrib #46

lucienbertin opened this issue Oct 27, 2015 · 2 comments
Assignees

Comments

@lucienbertin
Copy link
Contributor

nguibs modal is appended to the body and as such is outside the namespaced part of the html, so the style is not applied.

find a way to inject nguibs style to the modal even if people are namespacing the distrib of lucca-ui

@bpaugam
Copy link
Contributor

bpaugam commented Oct 29, 2015

Additional prefix can be specified in theme overrides for nguibs modals - cf fb473bc

@bpaugam bpaugam closed this as completed Oct 29, 2015
@bpaugam
Copy link
Contributor

bpaugam commented Oct 30, 2015

Actually, it did not work, After much research and a ticket at the sass project repo, I came up with a solution (code ain't pretty, but the use is much simpler). 1a79a92

The only thing you need to do is to add your '#namespace' selector as a class to the angular ui bootstrap modal and backdrop (with the hash remove), like so:

#myAwesomeApp{ @import "bower_components/lucca-ui/scss/lucca-ui.namespace"; }
    var modalInstance = $uibModal.open({
      templateUrl: 'myModalContent.html',
      controller: 'ModalInstanceCtrl',
      windowClass: "myAwesomeApp {optional_nguibs_prefixed_class}",
      backdropClass: "myAwesomeApp {optional_nguibs_prefixed_class}"
      }

Of course, this is needed only if you are using the namespaced dist of lucca-ui.

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

No branches or pull requests

2 participants