Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

118
Vistas
Adding CSS to Shadow-root created by a third party module

I'm working on a Magento2 website and I've installed an Amazon pay module that has created a few extra buttons on the checkout page (default Luma theme). Most of these new elements are fine when it comes to overriding their CSS. However the plugin has also created a Shadow Root with it's own style tags and div elements encapsulated within it. I need to override 1 of the style rules to fit my needs.

While I found a lot of documentation regarding what is Shadow-Root, how to create one and how to subsequently inject CSS into it, I'm confused how to change the CSS of Shadow-Root generated by a third party plugin.

Below is the code: the div with id="ui-id-1" is what I pressume to be the host of the root since the #shadow-root (open) is placed directly within it (it's child). I simply want to change one of the rules that is already present in the style tags within the existing shadow-root.

<div id="ui-id-1" class="amazonpay-button-parent-container-checkout-A30W0859IUOOZ7" 
role="button" aria-label="Amazon Pay - Use your Amazon Pay Sandbox test account" 
title="Pay using the information already stored in your Amazon account" 
style="width: 300px; height: 45px; position: relative;">

  #shadow-root (open)
  </style>
  
  <--THERE'S ONE RULE IN HERE I NEED TO OVERRIDE-->

  </style>
  <div>

  <--SHADOW ROOT'S HTML ELEMENTS ARE PLACED HERE - I DO NOT WANT TO TOUCH THIS-->

  </div>

</div>

Can somebody help me come up with a solution? Perhaps some script tags that I can add to the checkout page that will override or add my own rule to the exisitng Shadow-root style tags?

Thank you

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda