Skip to content

Convert discussion block sass variable into css variables - #37742

Merged
salman2013 merged 4 commits into
masterfrom
salman/convert-discussion-scss-variables
Dec 30, 2025
Merged

Convert discussion block sass variable into css variables#37742
salman2013 merged 4 commits into
masterfrom
salman/convert-discussion-scss-variables

Conversation

@salman2013

@salman2013 salman2013 commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

Description:

In this PR i converted builtin discussion block Sass variables into CSS variables.

I added them all inside :root { ... } in file: common/static/sass/_builtin-block-variables.scss
(CSS var reference on MDN)

Following is the list of variables:

$actions-dropdown-width
$actions-dropdown-offset
$border-color-4
$comment-image-dimension
$forum-color-active-thread
$forum-color-hover
$forum-color-active-text
$forum-color-background
$forum-x-large-font-size
$forum-color-copy-light
$forum-large-font-size
$forum-border-radius
$forum-base-font-size
$forum-small-font-size
$forum-color-border
$forum-color-background-light
$forum-color-editor-preview-label
$forum-color-following
$forum-color-error
$forum-color-pinned
$forum-color-reported
$forum-color-closed
$forum-color-staff
$forum-color-community-ta
$forum-color-response-count
$forum-color-read-post
$forum-color-hover-thread
$forum-color-reading-thread
$forum-color-never-read-post
$forum-color-navigation-bar
$forum-color-primary
$green
$line-height-base
$pink
$post-image-dimension
$response-image-dimension
$serif

Ticket Ref: openedx/public-engineering#456

Acceptance Criteria

The Discussion XBlock UI should remain unaffected.

How to test:

  • Run npm run compile-sass-dev in lms shell.
  • Open discussion XBlock in the lms. (To enable discussion block we can follow Discussion Block Extraction #36539 (comment))
  • In dev tool We can use following command in console to verify the above mentioned variables
getComputedStyle(document.documentElement).getPropertyValue('--actions-dropdown-width')

Testing results

Screenshot 2025-12-23 at 12 20 05 AM

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Dec 10, 2025
@openedx-webhooks

openedx-webhooks commented Dec 10, 2025

Copy link
Copy Markdown

Thanks for the pull request, @salman2013!

This repository is currently maintained by @openedx/wg-maintenance-edx-platform.

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 10, 2025
@salman2013 salman2013 changed the title chore: convert discussion sass variable into css variables Convert discussion block sass variable into css variables Dec 10, 2025
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions Dec 11, 2025
@salman2013
salman2013 marked this pull request as ready for review December 22, 2025 19:44

@farhan farhan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

$container-max-widths

is used here, shouldn't it be converted?

@salman2013

Copy link
Copy Markdown
Contributor Author

$container-max-widths

is used here, shouldn't it be converted?

Yes i believe it should be converted so i added this into _builtin-block-variables file and used the converted one.

@salman2013
salman2013 requested a review from farhan December 23, 2025 19:54

@farhan farhan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems good to me

@salman2013
salman2013 merged commit 2aeac45 into master Dec 30, 2025
69 checks passed
@salman2013
salman2013 deleted the salman/convert-discussion-scss-variables branch December 30, 2025 18:13
@github-project-automation github-project-automation Bot moved this from Waiting on Author to Done in Contributions Dec 30, 2025
anfbermudezme pushed a commit to Pearson-Advance/edx-platform that referenced this pull request Feb 16, 2026
)

* chore: convert discussion sass variable into css variables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants