Angular-google-maps: can't style [sebm/agm]-map-container-inner

Created on 6 Jun 2017  路  2Comments  路  Source: SebastianM/angular-google-maps

Issue description
We are unable to put any styling on the container-inner class, because it exists in a separate template. The reason is that angular attaches ngcontent attribute to tags inside a template, and attaches this attribute selector to all css selectors in a component style, to make sure component style decisions don't affect other components.

Since the code inside is a separate component, it seems there is no way to style its innards, specifically the agm-map-container-inner

Steps to reproduce and a minimal demo of the problem
.agm-map-container-inner{
border: 1px solid green
}

Current behavior
Does nothing

Expected/desired behavior
Attaches green border to the map

angular2 & angular-google-maps version
angular 4, any agm version

Other information

Most helpful comment

@doom777 you can use the deep css selector. Something like this should work:

agm-map /deep/ .agm-map-container-inner { ... }

Please feel free to reopen this issue.

All 2 comments

@doom777 you can use the deep css selector. Something like this should work:

agm-map /deep/ .agm-map-container-inner { ... }

Please feel free to reopen this issue.

Add this to for angular / ionic projects global.scss
.agm-map {
height: 90%;
.agm-map-container-inner .sebm-google-map-container-inner{
border: 2px solid red;
border-radius: 15px;
}
I hope it helps someone

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Subhojit1992 picture Subhojit1992  路  3Comments

gnujeremie picture gnujeremie  路  3Comments

nthonymiller picture nthonymiller  路  4Comments

ChrisDevinePimss picture ChrisDevinePimss  路  3Comments

gizm0bill picture gizm0bill  路  4Comments