Skip to content

Commit

Permalink
3rd option to override css in a component with Shadow Dom
Browse files Browse the repository at this point in the history
  • Loading branch information
ger-benjamin committed Nov 16, 2021
1 parent c301cee commit 54e03bc
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ class Controller extends AbstractDesktopController {

const drawLidarprofilePanelActive = new ngeoMiscToolActivate(this, 'drawLidarprofilePanelActive');
this.ngeoToolActivateMgr.registerTool('mapTools', drawLidarprofilePanelActive, false);

// CUSTOM Override style in the Shadow DOM scope.
const style = document.createElement( 'style' )
style.innerHTML = 'strong { color: darkblue; }'
const demoAuthPanel = document.querySelector('demo-auth-panel').shadowRoot;
demoAuthPanel.querySelector('gmf-auth-form').shadowRoot.appendChild(style);
}

/**
Expand Down

0 comments on commit 54e03bc

Please sign in to comment.