{"action":"created","issue":{"url":"https://api.github.com/repos/quentin-ol/angular2-openlayers/issues/8","repository_url":"https://api.github.com/repos/quentin-ol/angular2-openlayers","labels_url":"https://api.github.com/repos/quentin-ol/angular2-openlayers/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/quentin-ol/angular2-openlayers/issues/8/comments","events_url":"https://api.github.com/repos/quentin-ol/angular2-openlayers/issues/8/events","html_url":"https://github.com/quentin-ol/angular2-openlayers/issues/8","id":191970328,"number":8,"title":"openlayers css","user":{"login":"FallenRiteMonk","id":8779846,"avatar_url":"https://avatars.githubusercontent.com/u/8779846?v=3","gravatar_id":"","url":"https://api.github.com/users/FallenRiteMonk","html_url":"https://github.com/FallenRiteMonk","followers_url":"https://api.github.com/users/FallenRiteMonk/followers","following_url":"https://api.github.com/users/FallenRiteMonk/following{/other_user}","gists_url":"https://api.github.com/users/FallenRiteMonk/gists{/gist_id}","starred_url":"https://api.github.com/users/FallenRiteMonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FallenRiteMonk/subscriptions","organizations_url":"https://api.github.com/users/FallenRiteMonk/orgs","repos_url":"https://api.github.com/users/FallenRiteMonk/repos","events_url":"https://api.github.com/users/FallenRiteMonk/events{/privacy}","received_events_url":"https://api.github.com/users/FallenRiteMonk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-28T10:33:10Z","updated_at":"2016-12-06T09:45:09Z","closed_at":null,"body":"Would it be possible to somehow import the css file of openlayers into the map component, because at the moment when using this library I have to:\r\n  -  install the library (contains ol3 as dependency)\r\n  -  install openlayers (to optain css)\r\n  -  globally import ol css so that controls have the right style\r\nby this manner I have openlayers as duplicated dependency, plus the globally import of the css which might be confusing for somebody using this library.\r\n\r\nNow my idea would be to somehow import the ol css file in the map component, so that its also shared with all its children, so that importing this library in a project and using it will result in the right styling of all the components without any extra imports. My problem now is that I couldn't find a way to do this until now, so I don't even know if it's even possible, but maybe you know a solution. If so, please implement or let me know how and I'll be happy to help with the implementation"},"comment":{"url":"https://api.github.com/repos/quentin-ol/angular2-openlayers/issues/comments/265105601","html_url":"https://github.com/quentin-ol/angular2-openlayers/issues/8#issuecomment-265105601","issue_url":"https://api.github.com/repos/quentin-ol/angular2-openlayers/issues/8","id":265105601,"user":{"login":"FallenRiteMonk","id":8779846,"avatar_url":"https://avatars.githubusercontent.com/u/8779846?v=3","gravatar_id":"","url":"https://api.github.com/users/FallenRiteMonk","html_url":"https://github.com/FallenRiteMonk","followers_url":"https://api.github.com/users/FallenRiteMonk/followers","following_url":"https://api.github.com/users/FallenRiteMonk/following{/other_user}","gists_url":"https://api.github.com/users/FallenRiteMonk/gists{/gist_id}","starred_url":"https://api.github.com/users/FallenRiteMonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FallenRiteMonk/subscriptions","organizations_url":"https://api.github.com/users/FallenRiteMonk/orgs","repos_url":"https://api.github.com/users/FallenRiteMonk/repos","events_url":"https://api.github.com/users/FallenRiteMonk/events{/privacy}","received_events_url":"https://api.github.com/users/FallenRiteMonk/received_events","type":"User","site_admin":false},"created_at":"2016-12-06T09:45:09Z","updated_at":"2016-12-06T09:45:09Z","body":"According to what what I read in the links you mentioned I would say:\r\n * using CSS combinators is for sure not the right solution, because as you mentioned it requires a rewrite of the css and that then would have to be done manually or by some kind of build script, which would be extra work on every ol update and one could then also put the corresponding styles into the components directly without having to bleed them trough.\r\n * encapsulation none seems to be the most suitable for the moment I think and as far as I understood it, only the main map-component would have to have it set, but I'll give it a try. Further more though I think its still not the best solution because then styles could also be easily overwritten by a different library one uses together with this one in a project.\r\n * That is what I'm doing at the moment in my test project where I use this library, but that is still something the user of the library would have to do. I think this could be a solution, but then the ol-css should at least be exported with this library so that one doesn't have to add the ol dependency only for the styling, or the ol dependency should not be exported with this library at all so that one has to implement also the js past of ol.\r\n\r\nTo your PS statement: how much of overweight would it be to this project if every component would be feed with the ol styling by styleUrls, meaning not only the map which would then have to bleed it to all the child components, but really every child by it self? This should be inspected because I saw that the ol.css file is only 4.2k of size.\r\n\r\nAs temporary solution we copy paste the styles manually to all the components which are implemented as I mentioned in the first point, but those would then have to be maintained manually on every ol update."}}
{"actor":{"display_login":"FallenRiteMonk"}}