Page 1 of 1

How to write css file?

PostPosted: Sat Mar 02, 2013 5:13 pm
by Wu Yuantse
I searched the forum and failed to find any detailed document.
How can I find any pattern instructions and write a case?

Re: How to write css file?

PostPosted: Sun Mar 03, 2013 5:22 am
by hanyl05
write down your purpose and someone will tell you how to write the css file to realize your purpose.
lots of websites have detailed information on how to write css file, just google it.

Re: How to write css file?

PostPosted: Sun Mar 03, 2013 8:29 am
by Tvangeste
Yeah, what exactly are you trying to achieve with the CSS file?

Re: How to write css file?

PostPosted: Sun Mar 03, 2013 2:50 pm
by Wu Yuantse
Tvangeste wrote:Yeah, what exactly are you trying to achieve with the CSS file?

Well,now I'm not quite certain what I want to achieve as I 've no idea which elements can be changed.
I want to try every element then finally get the appearance I like most.

Besides, I sent you a message but haven't get any reply, maybe it failed to be sent?

Re: How to write css file?

PostPosted: Sun Mar 03, 2013 8:19 pm
by Tvangeste
Wu Yuantse wrote:Well,now I'm not quite certain what I want to achieve as I 've no idea which elements can be changed.
I want to try every element then finally get the appearance I like most.

You could take a look at qt-style.css file in the GoldenDict repository to see some examples. Also, you could search for qt-style.css on this forum for many examples.

Unfortunately, there is no documentation about all the available tags, one just need to experiment a bit.

Just in case, here's my current qt-style.css and article-style.css files: https://gist.github.com/VVSiz/5078078

Wu Yuantse wrote:Besides, I sent you a message but haven't get any reply, maybe it failed to be sent?

Yep, I got it, and I apologize for not responding, it takes time and effort to respond and I don't always have a lot of time. It is much better for general questions to be asked here on the forum so that others could see and answer (and future users could search for the answers later on).

Re: How to write css file?

PostPosted: Mon Mar 04, 2013 7:41 am
by Wu Yuantse
Tvangeste wrote:
Wu Yuantse wrote:Well,now I'm not quite certain what I want to achieve as I 've no idea which elements can be changed.
I want to try every element then finally get the appearance I like most.

You could take a look at qt-style.css file in the GoldenDict repository to see some examples. Also, you could search for qt-style.css on this forum for many examples.

Unfortunately, there is no documentation about all the available tags, one just need to experiment a bit.

Just in case, here's my current qt-style.css and article-style.css files: https://gist.github.com/VVSiz/5078078

Wu Yuantse wrote:Besides, I sent you a message but haven't get any reply, maybe it failed to be sent?

Yep, I got it, and I apologize for not responding, it takes time and effort to respond and I don't always have a lot of time. It is much better for general questions to be asked here on the forum so that others could see and answer (and future users could search for the answers later on).

Well,the systax seems a little complex and I don't know how the general css is applied to this software.But there's several I'm eager to change.
1.The font.Among my dictionaries,the font of one is beautiful and the others are all the same and a little ugly.As the picture folling.Besides,the beautiful font is much larger displayed on my android.I want to choose a font applied to all the dictionaries and make the size the same.(I've no idea whether it's possible to change the font in different place:the meanings of words,the phonetic sysbol,the example sentences,etc.)
2.Change the pronunciation button icon.
3.To specify a icon of each of my dictionaries.Many of the oringinal icons are ugly,improper,or not specified.
4.To resize all the pictures by scale.They're often too large compared to the text .\

Besides,how does the qt-style.css work?Nothing seems changed.
Many many thanks.
无标题.jpg
无标题.jpg (122.27 KiB) Viewed 18469 times

Re: How to write css file?

PostPosted: Mon Mar 04, 2013 7:58 am
by Wu Yuantse
In addition,the phonetic symbol is often wrongly displayed.Not sure if it's possible to solve by font.
无标题.jpg
无标题.jpg (10.49 KiB) Viewed 18468 times

Re: How to write css file?

PostPosted: Mon Mar 04, 2013 4:16 pm
by Wu Yuantse
I made some icons for each dictionaries,they work well on my computer,but doesn't work on my android.

Re: How to write css file?

PostPosted: Mon Mar 04, 2013 4:48 pm
by Tvangeste
GoldenDict for PC and GoldenDict for Android are two independent projects (with different sources even), so their behavior might be different.

All I know about CSS support in Goldendict for Android is here: http://goldendict.mobi/faq.php