HTML editor

Thomas Bruederli roundcube at gmail.com
Fri Sep 15 13:56:50 CEST 2006


Well, that's the problem between standards and real world. All those
things your Firefox is complaining about, are hacks that make RoundCube
appear as it should in most browsers.

Martin Marques wrote:
> Some things I found after upgrading to 346:

This is not related to rev 346. Those hacks have been there from the
beginning.
> 
> Much to many CSS errors in my javascript console. Some related to IE hacks (I'm working with Firefox 1.5.0.6). Basically in mail.css and also in common.css. I'll lay down only some, because there are too much:
> 
> Unknown property 'behaviour' in line... (this is in common.css)
> 
> img
> {
>   behavior: url('skins/default/pngbehavior.htc');
> }

This makes PNG images with alpha channel to be displayed correctly in
IE. As you might know, IE does not actually display alpha channels.
> 
> In mail.css there are errors like this (sorry it's in spanish):
> 
> Error: Error al leer el valor para la propiedad 'width'.  Declaración rechazada.
> Archivo de origen: https://bugs.unl.edu.ar/mail/skins/default/mail.css
> Línea: 119

This is also a IE hack because it cannot display block containers having
top,right,bottom,left defined. But it can understand javascript code
within CSS properties (!).
> 
> And:
> 
> /*\*/
> html>body*#quicksearchbar { background-image: none; }
> html>body*#quicksearchbar a { top: 5px; }
> html>body*#quicksearchbar #quicksearchbox { width: 180px; top:0px; right: 1px; left: auto; }
> /**/
> 
> What does this do? I couldn't find much info on it.

This is an ugly hack for Safari to not apply some styles to the search box.
> 
> And there are lots of others.
> 
> Want me to put a ticket in the trac system on this?
> 

No, please don't, because these are not actually bugs but hacks.
I like standards too and a really care about them but on the other side,
I don't want to see dozens of error tickets because some browsers are
not able to display the UI right. The RoundCube UI is based on CSS 2 and
unfortunately not all browsers are ready to interpret all rules as
they're supposed to do. Until this happens (if ever) we have to live
with such hacks. Once IE7 has replaced all older versions, we can remove
many of them but I'm sure new hacks will be necessary.

Here you can find a list of known css hacks:
http://centricle.com/ref/css/filters/

What we could do, to reduce the number of errors shown in your Firefox
console, is to separate all IE hacks to a file and include it with a
conditional comment.

~Thomas





More information about the Dev mailing list