Skip to content

Conversation

@obscherler
Copy link

@obscherler obscherler commented Oct 23, 2025

Sorry for not providing a description earlier, I had to run to catch my train, and I understand there’s a deadline for the Ulmo release process, so I wanted my work to be available as soon as possible.

This PR gets the brand package to compile with Paragon 23, allowing to use it with the MFE_CONFIG["PARAGON_THEME_URLS"] setting, which allows to change the MFE theme without rebuilding the Docker image.

It’s based on @ahmed-arb’s ahmed-arb/ulmo-upgrade branch, and inspired by his ahmed-arb/test-design-tokens branch, which helped me get started.

I think it’s not technically speaking “using design tokens” (I can’t tell for sure because I had no experience with Paragon or design tokens until a week ago,) because it’s still the same SCSS customisation as before, with SCSS variables for colours replaced by CSS variables. However, these CSS variables are defined in a token file, so it should simplify theming.

Since Indigo’s dark theme is based on the them toggle setting the indigo-dark-theme class on <body> (as opposed to Paragon 23’s variants CSS switching, which I wouldn’t know how to achieve with the current toggle switch,) and the dark theme SCSS being very different from the light (and also my partial understanding of theme variants, which seem to need redefining A LOT of things as soon as they’re not called light, because everything that Paragon’s light theme handily defines is lost) this version provides only one variant called light, but which switched to dark mode when the indigo-dark-theme class is set on <body>. To achieve that, I added a dark branch in the color.json file, that I use to redefine the main CSS variables in body.indigo-dark-theme, just like it was done in SCSS in the previous version. That’s why I call it “integrating the dark theme hackily.”

I hope this helps. I would welcome feedback, as I’d be interested to learn to do make this more properly in the future, with design tokens and theme variants.

@if type-of($variant) == "number" {
$color-level: $variant;
}
@import "~@openedx/paragon/styles/scss/core/core.scss";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should just import the specific mixins we use here. Also, would core.scss be a better place to import this in case we end up needing these mixins in any other style sheet?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You’re right, I got the wrong file. I somehow thought it was a Paragon mixin defined there, but it seems to come from ~bootstrap/scss/buttons.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve replaced this import with @import "~@openedx/paragon/dist/Button/mixins" in core.scss.

"build-scss": "paragon build-scss --corePath ./paragon/core.scss --themesPath ./paragon/build/themes",
"build": "make build",
"build:watch": "nodemon --ignore dist -x \"make build\"",
"serve": "paragon serve-theme-css -h 0.0.0.0",
Copy link

@ahmed-arb ahmed-arb Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, why do we need the serve script?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For testing, to serve the built CSS files so that the MFE can load them from MFE_CONFIG["PARAGON_THEME_URLS"].

@ahmed-arb
Copy link

Thanks, Olivier! I appreciate the PR. I'll build it locally to test the changes before we proceed.

@obscherler obscherler force-pushed the oscherler-openlearnity/ulmo-dt branch from fe47a46 to f0e9839 Compare October 24, 2025 12:43
@ahmed-arb
Copy link

Tested these changes on my local instance. They seem to work fine. Let's merge this.

@ahmed-arb ahmed-arb merged commit 3b4ba40 into edly-io:ahmed-arb/ulmo-upgrade Oct 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants