However, the same server may be hosting courses both in Hebrew and in English, and even in a Hebrew course there may be some problems in English, so ideally the "file" including these CSS changes should be included conditionally... so they don't fit well either as a "custom" theme for an entire course or in a math4-overrides.css file.
One option I am considering is a conditionally loaded file similar to math4-overrides.css which would be loaded when a particular language is set as the language of a specific problem, but this is quite a hack, and would probably misbehave on some types of "pages" which load several problems, and would add an extra conditional test in the templating system really only needed by right-to-left languages.
I would prefer to find a solution which would somehow effect only the "block" of HTML code for a single question at a time, if possible.
Does anyone have any experience with alternatives to override CSS in many PG files using an including macro file, somewhat like PGcourse.pl?
References I am aware of: