Page 1 of 1

How to neglect the enforcement of example color in DSL?

PostPosted: Sun Jul 21, 2013 2:37 am
by yuchen
There is a sentence in my dictionary like this:
Code: Select all
<span class="dsl_ex"><font color="firebrick">I would recommend against going out on your own. </font></span>

However, its color is gray rather than firebrick. Then I found this in default css:
Code: Select all
.dsl_ex, .dsl_ex font[color] /* DSL Feature: Enforce the example color even if the childen tags say otherwise */ {
   color: gray;
}

I tried to add
Code: Select all
.dsl_ex, .dsl_ex font[color] {
   color: inherit!important;
}

to my custom css but it failed. I wonder how to neglect the enforcement of example color in DSL dictionaries.
Thanks a lot! :D

Re: How to neglect the enforcement of example color in DSL?

PostPosted: Sun Jul 21, 2013 6:17 am
by Tvangeste
This is intentional, to preserve compatibility with Lingvo (the de-facto reference implementation for DSL).

If you really really wish to have non-default colors in example sections, please be aware that your dictionary will not be rendered as you'd expect in other 3rd party tools that support DSl (including Lingvo).

And there is no simple way to disable this feature, which is intentional as well. :)

It can be done on color-by-color basis, like this:
Code: Select all
.dsl_ex font[color=firebrick] {
   color: firebrick !important;
}


You might add other colors that are used in your dictionary.

Re: How to neglect the enforcement of example color in DSL?

PostPosted: Thu Jul 25, 2013 3:43 am
by yuchen
Thanks for your suggestion. That's enough for me ^_^