From 54e03bc997fad71921aec5acd69be2226589e393 Mon Sep 17 00:00:00 2001 From: Benjamin Gerber Date: Tue, 16 Nov 2021 15:44:00 +0100 Subject: [PATCH] 3rd option to override css in a component with Shadow Dom --- .../static-ngeo/js/apps/Controllerdesktop_alt.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/geoportal/geomapfish_geoportal/static-ngeo/js/apps/Controllerdesktop_alt.js b/geoportal/geomapfish_geoportal/static-ngeo/js/apps/Controllerdesktop_alt.js index 6a1ebb375..79544c8aa 100644 --- a/geoportal/geomapfish_geoportal/static-ngeo/js/apps/Controllerdesktop_alt.js +++ b/geoportal/geomapfish_geoportal/static-ngeo/js/apps/Controllerdesktop_alt.js @@ -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); } /**