I want to change the display style inside of the #shadow-root and am having some trouble targeting it. First question, is it possible to target it through CSS? Or is it better to do it through JS?
#retirement-services-modal #rs-two-col::shadow(.wrapper) {
display: flex;
align-items: center;
}
<div id="retirement-services-modal">
<sdf-layout-two-col id="rs-two-col">
#shadow-root
<div class="wrapper">
<div class="col-1">content goes here</div>
<div class="col-2">content goes here</div>
</div>
</sdf-layout-two-col>
</div>
I am trying to target the .wrapper inside the #shadow-root to add a display: flex; and align-items: center; .
I tried to target it with ::shadow but that did not seem to work. I also tried ::part but that did not seem to work either. Are there any other ways to target it through CSS?
::shadowwon't work, add the:part()code you tried.styleattribute of HTML Markup tags, it can only address elements belonging to an HTML tag.