New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

How to neglect the enforcement of example color in DSL?

General discussion

How to neglect the enforcement of example color in DSL?

Postby yuchen » Sun Jul 21, 2013 2:37 am

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
yuchen
 
Posts: 14
Joined: Thu May 23, 2013 10:00 am

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

Postby Tvangeste » Sun Jul 21, 2013 6:17 am

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.
Tvangeste
 
Posts: 893
Joined: Thu Jun 02, 2011 11:42 am

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

Postby yuchen » Thu Jul 25, 2013 3:43 am

Thanks for your suggestion. That's enough for me ^_^
yuchen
 
Posts: 14
Joined: Thu May 23, 2013 10:00 am


Return to General

Who is online

Users browsing this forum: No registered users and 51 guests