How to customize specific scss files

Hello,

For changes in the scss files from the /lms/static/sass/partials/lms/theme it is enough to rebuild the Openedx docker image: tutor images build openedx and restart the platform tutor local start -d and after that the changes applies.
But there is css in other files other than that directory, for example I want do remove some css from /lms/static/sass/multicourse/_course_about.scss, however I add this template with the same path in my theme(specific comprehensive theme), doing the specific changes, run the same instructions, rebuild the Openedx docker image: tutor images build openedx and restart the platform tutor local start -d but the changes does not appear. I use tutor in production mode, please tell me if I need to do something extra because I read all the documentations, including https://docs.tutor.overhang.io/configuration.html and I do not understand why these changes are not applied.

Hi @adrian,
For comprehensive theme in Open edX, you should consider templates, static-templates, Mako/Jinja2 etc. as well as sass files, for overriding some custom sides, in my opinion.
Here basic example theme just for demonstration purposes https://github.com/murat-polat/gran-openedx-theme. I just updated Readme file, and I hope this basic example can clarify your question’s … Thanks…

Ok, I saw your theme but didn’t answer my question, why the changes in the /lms/static/sass/multicourse/_course_about.scss are not applied, what I have to do if I want to remove some css from this file?

@regis please help me on this. I know you don’t respond to topics that are covered in the documentation but I cannot find a solution anywhere for this. I have many css files that I want to override and I can not do the changes in other location than sass/partials/lms/theme. It’s pretty annoying and not a healthy practice to overwrite all the css from these files

  1. What visual change are you trying to make? (e.g: are you trying to change a specific color?) At which url? A screenshot would be great.
  2. Are you quite sure that the css rule that affects your visual element comes from _course_about.scss?
  3. In which file from your custom template did you try to override the rules from _course_about.scss? If it were in the Indigo theme, the source file would be in indigo/theme/lms/static/sass/multicourse/_course_about.scss (or so I believe).

Without these elements I am unable to reproduce your issue and understand where the problem comes from.

  1. I want to customise the course page, change width and spaces, remove border line, change button color and fonts. Like in this screenshot

  2. I find that the css rules for this modification comes from file /_course_about.scss, for example border line. Like in this screenshot

  3. It is indigo theme, I remove the css line and add in the path indigo/theme/lms/static/sass/multicourse/_course_about.scss. Screenshot - Capture

  4. Render the theme, tutor images build openedx and restart the platform tutor local start -d. Still nothing happened

Actually, you should not be adding your custom sass rules to indigo/theme/lms/static/sass/multicourse/_course_about.scss – my assumption above was incorrect. In fact, you should simply add your rules to indigo/theme/lms/static/sass/partials/lms/theme/_extras.scss. I did just that by adding the following rule:

.course-info header.course-profile .intro-inner-wrapper .intro > .heading-group {
	border-bottom: 15px solid red;
}

Which is successfully applied:

If that works for you I think you owe me a beer :wink:

1 Like

Yes, I know in that file it works but I didn’t know if this is the correct way to do it, because it keeps all the rules even if they are overwritten. But now if you have confirmed me I will do like this.

Thank you friend. And about the beer, whenever you want if you come to Romania. Or if I come to France, l want go one day in the Alps with my snowboard, sooner I hope :snowboarder:

@adrian and @regis im facing similar problem


here i have added custom styles so that the page contains whole height and footer is adjusted at the bottom .
template> indigo >lms>static>sass>partials>lms>theme<_extras.scss
.window-wrap {
position: relative;
min-height: 100vh !important;
display: flex !important;
flex-direction: column !important;
justify-content: space-between !important;
overflow: hidden;
width: 100%;
}
thee is no change