Using CSS external stylesheets - Is this possible?

@bergman, I’m unsure if I understand your question correctly, so I’ll describe the current behavior. To use this feature:

  1. Create test.css with the following content:
    * {
      background: red !important;
    }
    
  2. In Studio, go to “Content → Files & Uploads” and add the CSS file.
  3. Go to “Settings → Advanced Settings” and add your resource to the list (e.g., ["/asset-v1:edX+DemoX+Demo_Course+type@asset+block@test.css"]).
  4. Visit some unit in the Preview; it should look like this:
  5. Visit the same unit in the Learning MFE; it should look like this:

In the legacy experience, XBlocks were rendered directly on the same page.
In the Learning MFE, they are still rendered by the LMS, so they must be displayed in an iframe. Therefore, you can apply the course-wide styles to XBlocks, but not to the rest of the page.

1 Like