How to add extra css to existing css files in EDx

470 views
Skip to first unread message

Chandrashekhar Patil

unread,
May 12, 2018, 9:06:42 AM5/12/18
to General Open edX discussion
Hello All, I have set up theme for my edx instance. But my Sign in and register buttons look different. Now I want to add some css to Register button. There is already css files generated from my SASS files. I did "Inspect Element" in browser and determined the cs to be applied and to which class it should be applied. It seems i have to apply css to lms-main-v1.css But when I added the changes in that css file, saved the file, recompiled the theme, it is not reflecting in LMS. Also when i again viewed that css file (lms-main-v1.css),i can't see the style that i added to it.  Anyone please tell me how can i add style to Register button. Or generally, can we edit generated Css files externally. Does it get applied.

Thanks in adavance

Bhagvan Kommadi

unread,
May 13, 2018, 12:09:43 PM5/13/18
to General Open edX discussion

Chandrashekhar Patil

unread,
May 13, 2018, 12:17:45 PM5/13/18
to edx-...@googlegroups.com
Hello Bhagvan,
Thanks. But i have gone through this.
I want to add extra CSS to existing one. IF read my question above, you will see my  problem is i want to create new css and then put it in one file and apply that.
Also please tell me : I added new image as "background.png" in my images folder but it is not changing my LMS gray color background with image. Please guide.
Thanks.

Regards,
Chandrashekhar Patil

--
You received this message because you are subscribed to the Google Groups "General Open edX discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/330f18b9-46f4-46c7-9035-70d5260b5d12%40googlegroups.com.

Alden Jones

unread,
May 14, 2018, 1:48:19 PM5/14/18
to General Open edX discussion
Hi Chandrashekhar,

In my personal experience, the easiest way to do that is with an _overrides.scss file in your theme. That way, the code will be added when you recompile the assets.
Did you create a custom theme?


Chandrashekhar Patil

unread,
May 15, 2018, 12:21:11 AM5/15/18
to edx-...@googlegroups.com
Hello Alden, Thanks for the reply.
But I had tried it yesterday. So when I added the additional style to this file, and tried to re-compile the theme; it gave error as "Build Failed"

Yes I have created the custom Theme.

Regards,
Chandrashekhar Patil

--
You received this message because you are subscribed to the Google Groups "General Open edX discussion" group.

Alden Jones

unread,
May 21, 2018, 2:05:28 PM5/21/18
to General Open edX discussion
Was there any other information in the error? 
What version of edX are you running?
Is it Devstack or Fullstack/Native?

dominic Anyanna

unread,
Aug 9, 2018, 2:56:10 PM8/9/18
to General Open edX discussion
hello Chandrashekhar
were you eventually successful ? if so any tips need to do same 

On Sunday, 13 May 2018 17:17:45 UTC+1, Chandrashekhar Patil wrote:
Hello Bhagvan,
Thanks. But i have gone through this.
I want to add extra CSS to existing one. IF read my question above, you will see my  problem is i want to create new css and then put it in one file and apply that.
Also please tell me : I added new image as "background.png" in my images folder but it is not changing my LMS gray color background with image. Please guide.
Thanks.

Regards,Chandrashekhar Patil
Reply all
Reply to author
Forward
0 new messages