Modifying a React component with a custom user style sheet

30 Views Asked by At

I'm trying to modify the display of a web page using a Stylish or Stylus userstyle.

The webpage in question is coded using React so none of the elements I need to target have IDs and have class names like scripts-components-context-menu-trigger-context-menu-trigger__SettingsBar--1tPL-

Almost none of the CSS rules I'm trying to create get applied.

I don't know why this is, if I had to guess I would guess it's either something to do with delayed loading within an SPA, or CSS isolation of the components, shadow DOM might even have something to do with it.

Does anyone have any experience of userstyling a React app?

Why doesn't it work, and is there anything I can do to get it to work?

UPDATE

It turned out the React code was in an iFrame, so all I had to do was use the url of the iFrame to get the userstyle to work.

0

There are 0 best solutions below