Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have gedit 3.6.2 (Lubuntu 13.04) and I've installed a plugin from gedit-markdown: support for Markdown language in gedit that allows me to preview markdown text in a bottom or side panel within gedit.

I want to know if it's possible to change the background color of the lower panel from white to something else like #999.

I'm using Greybird (from "shimmer-themes" in the Software Center) in which I've already modified gtk.css to have the following colors:

/* default color scheme */
@define-color bg_color #9e9e9e;
@define-color fg_color #000043;
@define-color base_color #8e8e8e;
@define-color text_color #000;
@define-color selected_bg_color #091825;
@define-color selected_fg_color #a2e5fb;
@define-color tooltip_bg_color #333333;
@define-color tooltip_fg_color #aaaaaa;

Despite these changes to gtk.css (which are effective for other gtk3 apps), the background color in the bottom panel stays white:

gedit-markdown plugin panel

For the upper (main) panel, I use a slightly modified Cobalt color scheme (/usr/share/gtksourceview-3.0/styles/cobalt.xml).

share|improve this question
    
I don't think preview-panel depends on gtk-colors.That plugin source has a styles/classicmarkdown.xml file from which all markdown related colors derived for preview-panel.You can make necessary change & recompile it to see whether it works or not. –  Khurshid Alam Jul 22 '13 at 12:38
    
@KhurshidAlam, if you are referring to /usr/share/gtksourceview-3.0/styles, these are the files present: check-style.sh, cobalt.xml, kate.xml, styles.rng, classic.xml, oblivion.xml, tango.xml. Are you using this plugin? Could you please provide the full path of styles/classicmarkdown.xml? In any case, the lower panel provides html content and not markdown. –  user25656 Jul 22 '13 at 13:40
1  
Try looking under ~/.local/share/gtksourceview-3.0/styles. And do NOT change anything /usr/share/gtksourceview-3.0/styles, copy it to ~/.local/share/gtksourceview-3.0/styles, change anything from there. –  Khurshid Alam Jul 22 '13 at 14:15
    
@KhurshidAlam, I do have the file you mentioned but the point is that that file affects only content in the upper panel which has markdown content. The lower panel which previews content as html is unaffected. I want to change the background color of the lower panel. –  user25656 Jul 22 '13 at 14:37
    
I noticed that. In older version it used to use a html-template, but now the markdown-preview is handled by python-markdown which converts markdown to html & hard-coded into source. Go to ~/.local/lib/python-$version/site-packages/markdown/docs. Inside you will find basic.css, default.css & _tempalte.html. You might look inside. Let me know if that helps. As a last resort you could try ask the author of this plugin. –  Khurshid Alam Jul 22 '13 at 15:54

1 Answer 1

up vote 0 down vote accepted
+50

A picture that worth a hundred words:

Markdown Preview in Gedit

And here's markdown preview in side-by-side mode:

Markdown preview side-by-side

Or try to change browser's default CSS for HTML elements.

share|improve this answer
    
I'll see how I can give this answer another 50 points if the rules allow :) Thank you so much. I was getting quite frustrated. –  user25656 Jul 24 '13 at 6:22
    
I added another image for side-by-side preview. –  user25656 Jul 24 '13 at 12:14
    
I got an answer that allows me to point to a css file so that I don't have to modify each markdown file: Markdown preview Python-based plugin for gedit. –  user25656 Aug 16 '13 at 2:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.