Skip to content

Instantly share code, notes, and snippets.

@bangedorrunt
Last active July 17, 2023 13:40
Show Gist options
  • Star 23 You must be signed in to star a gist
  • Fork 12 You must be signed in to fork a gist
  • Save bangedorrunt/894da54808f414ec11db1897845f8e6f to your computer and use it in GitHub Desktop.
Save bangedorrunt/894da54808f414ec11db1897845f8e6f to your computer and use it in GitHub Desktop.
GoldenDict Dark Theme
body
{
margin-top: 1px;
margin-right: 3px;
margin-left: 2px;
margin-bottom: 3px;
background: #201F1F;
color: white;
font-family: Bookerly, Segoe UI, Palatino Linotype, Arial Unicode MS;
}
a:link
{
color: orange;
}
ul
{
color: white;
}
.gdarticle
{
background: #201F1F;
color: white;
margin-top: 0.1em;
margin-bottom: 0.4em;
padding: 5px;
border: 1px solid white;
}
.gdactivearticle
{
border: 1px solid #3399FF;
}
.gdarticleseparator + script + .gdactivearticle .gddictname
{
border-top: 1px solid #3399FF;
}
.gdarticleseparator
{
display: none;
}
.gddictname
{
font-size: 14px;
font-weight: normal;
float: right;
border: 0px;
margin: -6px;
margin-bottom: 5px;
margin-left: 2px;
padding-right: 0.4em;
-webkit-user-select: none;
user-select: none;
cursor: default;
}
.gdactivearticle .gddictname
{
font-size: 14px;
font-weight: normal;
margin: -6px;
margin-bottom: 5px;
margin-left: 2px;
float: right;
border: 1px solid white;
}
.gddicticon
{
display: inline;
vertical-align: text-bottom;
float: right;
padding-right: 0em;
padding-left: 0.3em;
}
/**
* Old Dictionaries using DSL format
*/
.gdarticlebody > span:first-child .dsl_headwords,
.gdarticlebody > h3:first-child
{
margin-top: -3px;
display: inline-block;
}
.gdspellsuggestion
{
/* Add some vertical space before the article */
margin-top: 1.5em;
}
.dsl_article, .dsl_definition, .dsl_ex, .dsl_opt, .dsl_lang, .dsl_m0, .dsl_m1, .dsl_m2, .dsl_m3, .dsl_m4, .dsl_u, .dsl_b, .dsl_i
{
color: white !important;
}
.dsl_p {
color: #FF7400 !important;
}
.dsl_b font {
color: #FFD300 !important;
}
.dsl_m2 font {
color: #71FF35 !important;
}
.dsl_i font {
color: white !important;
}
.dsl_article .dsl_definition {
color: #FFEA13 !important;
}
.dsl_article .dsl_definition font[color="darkcyan"]
{
color: #FFEA13 !important;
}
.dsl_article .dsl_definition font[color="teal"]
{
color: #FFEA13 !important;
}
.dsl_article .dsl_definition font[color="darkslategray"]
{
color: #E7003E !important;
}
.dsl_article .dsl_definition font[color="darkslateblue"]
{
color: #E7003E !important;
}
.dsl_article .dsl_definition font[color="darkmagenta"]
{
color: #E7003E !important;
}
.dsl_article .dsl_definition font[color="sienna"]
{
color: #E7003E !important;
}
.dsl_article .dsl_definition font[color="rosybrown"]
{
color: #E7003E !important;
}
.dsl_article .dsl_definition font[color="dimgray"]
{
color: white !important;
}
.dsl_article .dsl_definition font[color="green"]
{
color: #E7003E !important;
}
.dsl_article .dsl_definition font[color="darkgreen"]
{
color: #E7003E !important;
}
::selection
{
background: yellow;
color: white;
}
code::selection
{
background: white;
}
.dsl_s_wav img, .lsa_play img, .forvo_play img[alt="Play"]
{
/**
display: none;
**/
}
.dsl_s_wav a, .lsa_play td:nth-of-type(1) a, .forvo_play td:nth-of-type(1) a
{
color: white;
width: 18px;
height: 14px;
/**
display: inline-block;
background: url('file:///control_play_lingvo.png') no-repeat center;
vertical-align: text-bottom;
-webkit-user-select: none;
user-select: none;
**/
}
/**
* OALD9 Dictionary
*/
.mdict, .mdict ol, .head-jump-pos, .head-jump-entry, .h-g, sn-gs, .sn-g, .x-gs, .xg, .rx-g, .x, .num, .def, .label-g, .collapse
{
color: white !important;
}
.head-jump-pos a
{
display: inline-block;
background-color: green;
color: white !important;
padding-top: 2px;
padding-bottom: 3px;
padding-left: 5px;
padding-right: 5px;
margin-right: 3px;
margin-bottom: 3px;
text-decoration: none;
font-size: 90%;
border-radius: 2px;
}
.mdict .if-gs
{
color: #E7003E !important;
}
.mdict .gram-g
{
color: #FF7400 !important;
}
.mdict .top-container
{
line-height: 1.2em !important;
}
.mdict .collapse, .mdict .webtop-g
{
background-color: #03A9F4 !important;
border-left: 3px solid #03A9F4 !important;
}
.mdict .collapse .body .h1, .mdict .collapse .body .deflist .li .eb
{
color: #D32F2F !important;
}
.mdict .collapse .body .inline .li
{
color: #512DA8 !important;
}
/** Fix numbered list **/
.mdict ol
{
list-style-type: none;
}
.mdict ol li
{
counter-increment: step-counter;
}
.mdict ol li::before
{
content: counter(step-counter);
color: #E7003E !important;
font-weight: bold;
}
/** Fix phonetics **/
.mdict .phon {
color: #E7003E !important;
font-weight: bold;
}
/**
* Longman Dictionary 6
*/
.entry, .example, .collocate, .collgloss, .sense, .neutral, .exas li
{
color: white !important;
}
.hyphenation, .homnum, .frequent
{
color: #FFEB3B !important;
}
.pron, .amevarpron
{
color: #D32F2F !important;
font-weight: bold;
}
.gram, .registerlab
{
color: #03A9F4 !important;
}
.propformprep, .expr, .colloc, .collo, .exp, .display, .nodeword {
color: #FF4081 !important;
}
.sensenum
{
color: #E7003E !important;
}
.collobox
{
background-color: #448AFF !important;
border-color: #448AFF !important;
}
.thesbox
{
background-color: #FFEB3B !important;
border-color: #FFEB3B !important;
}
.grambox .expl, .grambox .compareword, .collobox .section, .thesbox .section
{
background-color: #201F1F !important;
}
.secheading
{
background-color: #1976D2 !important;
}
/**
* Từ điển Lạc Việt
*/
table, #definition_T_id, #mh_n_T_id, #mh_T_id, #C_C
{
color: white !important;
}
#C_C font {
color: white !important;
}
MainWindow #searchPane #translateLine, MainWindow #searchPane #wordList
{
background: #201F1F;
color: #D4D2CF;
}
MainWindow #translateLine, ScanPopup #translateLine, MainWindow #wordList, MainWindow #dictsPane #dictsList, MainWindow #historyPane #historyList
{
background: #201F1F;
color: #D4D2CF
}
@nimatrueway
Copy link

How to install it:

  1. Create a folder with the desired name (e.g. "DraculaTheme") in goldendict settings/styles folder.
    ( Windows: %APPDATA%\GoldenDict\styles, Linux: ~/.goldendict/styles )
  2. Add these two files to that folder.
  3. Restart GoldenDict, then in Preference select your added style.

@tmltmltml
Copy link

Thanks for your work!
An alternative choice for step 3: choose File/Rescan Files(or press Ctrl+F5), then in Preference/Interface select your Add-on style.

@liginity
Copy link

liginity commented Dec 9, 2020

Thank you for you instructions. 😃
But I have a problem. After putting the theme in the folder, goldendict looks like this.

image


The problem is that for short articles of a look-up, there is white area in the background. Could you help modifying this?

@alexeiol
Copy link

alexeiol commented Dec 1, 2021

I will never be able to thank you enough for making this theme. After 30+ years of daily computer use, my eyes hurt badly every time I look at a bright white screen. As a writer, I use Goldendict a lot, but it was causing me intense pain after a few minutes work. Thank you a million times for your effort!

@JingMatrix
Copy link

Thank you for you instructions. smiley But I have a problem. After putting the theme in the folder, goldendict looks like this.

image

The problem is that for short articles of a look-up, there is white area in the background. Could you help modifying this?

This is more related to qt plateform theme, please consider to use qt5ct, here is my result
Capture d’écran de 2022-03-04 02-46-05

@shikkakun
Copy link

Thank you for you instructions. smiley But I have a problem. After putting the theme in the folder, goldendict looks like this.
image
The problem is that for short articles of a look-up, there is white area in the background. Could you help modifying this?

This is more related to qt plateform theme, please consider to use qt5ct, here is my result Capture d’écran de 2022-03-04 02-46-05

I have the latest goldendict installed and yet I have the same problem. Could you link a version where that doesn't happen? I have this file installed. GoldenDict-1.5.0-RC2-372-gc3ff15f_(QT_5123).7z
Please help me, I use this app everyday.

@JingMatrix
Copy link

Just add

html {
 background: #201F1F;
}

will solve this problem.

@shikkakun
Copy link

html {
 background: #201F1F;
}

It didn't solve it. I copy and pasted that into the article-style file.
Is the file I downloaded the correct one?
imagem
Here's how it looks.
Thanks in advance for helping me.

@JingMatrix
Copy link

Well, it almost solves your problem: your main page has no blanks anymore.
Other small parts require more complicated adjustments, my current settings doesn't do that though my previous one maybe had done that.
So I am not able to give you a css file to render fully black.
My suggestion is that you could use grey color instead of black.

@shikkakun
Copy link

I understand. Thank you for helping me!
I'm just wondering, how did you obtain this result?

image

Is it a different file? A different version?

@JingMatrix
Copy link

Honestly, I cannot re-produce this result (too lazy to configure since I have a different and comfortable theme now),
it become so after I did some configuration of qt theme using qt5ct.
You can try it by your own, I don't remenber what is the actual options in qt5ct that produced the imaged I uploaded.
Also I would encourage you to use Qt designer to write your own theme.

@shikkakun
Copy link

Hello. Thank you for your kind answer.
I know nothing about programming at all so there's simply no way I could write a code. I'm just a translator.
I'm brazilian and I don't have much money, but I'm willing to pay $30 (30 dollars) for someone who can write a dark theme for me. Or at least let me know if there's no way to have it on windows, only on linux. Or which version allows it.

@JingMatrix
Copy link

Hello. Thank you for your kind answer. I know nothing about programming at all so there's simply no way I could write a code. I'm just a translator. I'm brazilian and I don't have much money, but I'm willing to pay $30 (30 dollars) for someone who can write a dark theme for me. Or at least let me know if there's no way to have it on windows, only on linux. Or which version allows it.

Okay, here is a theme I made for you based on my grey theme: https://gist.github.com/JingMatrix/dacb5d505b5a1e96b1e896b5d3a9dcbc.
If it is helpful enough to you, you can sponsor me on Github with whatever money you are willing to.

@shikkakun
Copy link

Hello. Thank you for your kind answer. I know nothing about programming at all so there's simply no way I could write a code. I'm just a translator. I'm brazilian and I don't have much money, but I'm willing to pay $30 (30 dollars) for someone who can write a dark theme for me. Or at least let me know if there's no way to have it on windows, only on linux. Or which version allows it.

Okay, here is a theme I made for you based on my grey theme: https://gist.github.com/JingMatrix/dacb5d505b5a1e96b1e896b5d3a9dcbc. If it is helpful enough to you, you can sponsor me on Github with whatever money you are willing to.

Thank you very much!
Unfortunately, it did not work. It only made the font darker.
But thank you very much anyways. I will give up now!

@mustafa-ad
Copy link

Hello. Thank you for your kind answer. I know nothing about programming at all so there's simply no way I could write a code. I'm just a translator. I'm brazilian and I don't have much money, but I'm willing to pay $30 (30 dollars) for someone who can write a dark theme for me. Or at least let me know if there's no way to have it on windows, only on linux. Or which version allows it.

Okay, here is a theme I made for you based on my grey theme: https://gist.github.com/JingMatrix/dacb5d505b5a1e96b1e896b5d3a9dcbc. If it is helpful enough to you, you can sponsor me on Github with whatever money you are willing to.

Thank you very much! Unfortunately, it did not work. It only made the font darker. But thank you very much anyways. I will give up now!

Hello, try this repository, it worked for me: https://github.com/yozhic/GoldenDict-Full-Dark-Theme

@shikkakun
Copy link

Hello. Thank you for your kind answer. I know nothing about programming at all so there's simply no way I could write a code. I'm just a translator. I'm brazilian and I don't have much money, but I'm willing to pay $30 (30 dollars) for someone who can write a dark theme for me. Or at least let me know if there's no way to have it on windows, only on linux. Or which version allows it.

Okay, here is a theme I made for you based on my grey theme: https://gist.github.com/JingMatrix/dacb5d505b5a1e96b1e896b5d3a9dcbc. If it is helpful enough to you, you can sponsor me on Github with whatever money you are willing to.

Thank you very much! Unfortunately, it did not work. It only made the font darker. But thank you very much anyways. I will give up now!

Hello, try this repository, it worked for me: https://github.com/yozhic/GoldenDict-Full-Dark-Theme

I just tried this now and it worked! I'm so happy. Thank you so so much. This will save my eyes for years to come :D
Looks like this: (so good)
imagem

@mustafa-ad
Copy link

Hello. Thank you for your kind answer. I know nothing about programming at all so there's simply no way I could write a code. I'm just a translator. I'm brazilian and I don't have much money, but I'm willing to pay $30 (30 dollars) for someone who can write a dark theme for me. Or at least let me know if there's no way to have it on windows, only on linux. Or which version allows it.

Okay, here is a theme I made for you based on my grey theme: https://gist.github.com/JingMatrix/dacb5d505b5a1e96b1e896b5d3a9dcbc. If it is helpful enough to you, you can sponsor me on Github with whatever money you are willing to.

Thank you very much! Unfortunately, it did not work. It only made the font darker. But thank you very much anyways. I will give up now!

Hello, try this repository, it worked for me: https://github.com/yozhic/GoldenDict-Full-Dark-Theme

I just tried this now and it worked! I'm so happy. Thank you so so much. This will save my eyes for years to come :D Looks like this: (so good) imagem

You are welcome, glad that it works for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment