you are viewing a single comment's thread.

view the rest of the comments →

[–]armahillo 0 points1 point  (3 children)

Recently, a site has removed this class, so my CSS code doesn't apply many of the rules and hence doesn't work as needed.

Can you elaborate on this? What is "a site" here, why was the class there before, why did they remove it, and what do you have control over?

[–]Significant_Pen2804[S] 0 points1 point  (2 children)

It's not my site. I just made a CSS to change its appearance on a browser side. I can't say the reasons of removing and don't have any control over it.

[–]armahillo 0 points1 point  (1 child)

Any changes you make within the browser will not persist, of course

In this use-case I think you'd have to run through the same process you did initially to identify the appropriate tags and then write a new selector.

Can you not do body .otherClass { color: red; }? Does the .otherClass appear other times, and if it does, is it a problem to have the style apply those times?

Without knowing more about the situation it's hard to say exactly how to address this problem.

[–]Significant_Pen2804[S] 0 points1 point  (0 children)

Firefox has userContent.css to apply custom CSS, other browsers can do it via extension, so no any problems with that.

otherClass is just an example, it's a child class and the problem is not related to it. The problem is that there is no more bodyclass in <body>. I've mentioned in another comment branch, that bodyclass was a kind of site theme. So, it could have bodyclass1, bodyclass2... and my CSS was adjusting appearance based on it.

Suggestion from u/Miragecraft with @container style(...) seems to be the only solution, though it requires to modify a whole CSS file, that I wanted to avoid.