Skip to content

feat: Support more CSS vars for problem block theming - #357

Open
xitij2000 wants to merge 1 commit into
openedx:mainfrom
open-craft:kshitij/css-props-problem-block
Open

xitij2000 wants to merge 1 commit into
openedx:mainfrom
open-craft:kshitij/css-props-problem-block

Conversation

@xitij2000

@xitij2000 xitij2000 commented Dec 2, 2026 •

Copy link
Copy Markdown

Replaces hardcoded values for problem block with more CSS variables to improve theming.

This is related to openedx/openedx-platform#39469 which applies a similar change to the non-extracted blocks and other CSS in the platform.

Testing instructions

https://gist.github.com/xitij2000/e11b8ae623e1a9bb02ba20f61a52c040

Concerns

To not result in an explosion of variables, some variables have been reused in places where they make sense but the default values don't match. For instance, border-radius-sm is used in 8 places, one that was peviously 4px and the rest were 3px. Likewise border-radius-md is used in 2 places one with 5px and the other 6px. Introducing, 5 css vars for border radius seemed like an overkill. Here are all the variable conflicts:

Variable Value Color Uses
--background-color-dark #666 #666666 2
#999 #999999 1
--background-color-light #fafafa #fafafa 3
#eee #eeeeee 1
--border-color-dark #666666 #666666 1
#aaa #aaaaaa 1
--border-color-light #ddd #dddddd 6
#e3e3e3 #e3e3e3 2
#eee #eeeeee 2
#eaeaea #eaeaea 1
--border-radius-md 5px 1
6px 1
--border-radius-sm 3px 7
4px 1
--font-bold 700 1
bold 1
--text-color-dark #2c2c2c #2c2c2c 1
#333 #333333 1
--text-danger #b00 #bb0000 3
#a00 #aa0000 1

Merge checklist:
Check off if complete or not applicable:

  • Version bumped
  • Changelog record added
  • Documentation updated (not only docstrings)
  • Fixup commits are squashed away
  • Unit tests added/updated
  • Manual testing instructions provided
  • Noted any: Concerns, dependencies, migration issues, deadlines, tickets

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Dec 2, 2026
@openedx-webhooks

openedx-webhooks commented Dec 2, 2026 •

Copy link
Copy Markdown

Thanks for the pull request, @xitij2000!

This repository is currently maintained by @openedx/axim-engineering.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@github-project-automation github-project-automation Bot moved this to Needs Triage in Contributions Dec 2, 2026
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions Dec 2, 2026
@xitij2000
xitij2000 marked this pull request as ready for review December 3, 2026 05:11
Replaces hardcoded colors, border styling, fonts etc used by the problem block
with CSS custom properties. These can now be restyled by themes. The variables
fall back to their original default values, so by default there is no visual
change.
@xitij2000
xitij2000 force-pushed the kshitij/css-props-problem-block branch from ed43689 to 76bbdf3 Compare December 3, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Status: Waiting on Author

Development

Successfully merging this pull request may close these issues.

2 participants