...
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Requirements:
OR
|
...
Configure external Paragon CSS URLs (e.g., from a hosted CDN).
The quickest way to get started is to use jsDelivr, a global production-ready CDN that has deep integrations with NPM, and a
$paragonVersion
wildcard to rely on the same version of@openedx/paragon
installed in your MFE. Configure thePARAGON_THEME_URLS
in your MFE configuration (you can use either of the approaches explained below).
Example:Code Block language py { "MFE_CONFIG_OVERRIDES": { "frontend-app-discussions<APP_ID>": { "PARAGON_THEME_URLS": { "core": { "urls": { "default": "https://cdn.jsdelivr.net/npm/@openedx/paragon@$paragonVersion/dist/core.min.css" } }, "defaults": { "light": "light", "dark": "dark" }, "variants": { "light": { "urls": { "default": "https://cdn.jsdelivr.net/npm/@openedx/paragon@$paragonVersion/dist/light.min.css" } }, "dark": { "urls": { "default": "https://cdn.jsdelivr.net/npm/@edx/brand-edx.org@alpha@openedx/paragon@$paragonVersion/dist/lightdark.min.css" } } } } } } }
Configuration approaches:
Import custom media breakpoints from Paragon into the SCSS entry point of your MFE.
Code Block language css // Within `src/index.scss` of your MFE @use "@openedx/paragon/styles/css/core/custom-media-breakpoints.css" as paragonCustomMediaBreakpoints; // If using `@edx/brand` to customize the default Paragon theme, also include: @use "@edx/brand/paragon/css/core/custom-media-breakpoints.css" as brandCustomMediaBreakpoints;
Note: you must utilize
@use
instead of@import
with this file. The SASS team also discourages the continued use of@import
, and plans to eventually remove it from the language entirely. See more information here.
...