[Seaside] Self adjusting CSS (based on browser type) extension toSeaside?

Boris Popov boris at deepcovelabs.com
Thu Nov 2 18:46:35 UTC 2006

I would personally prefer to stay away from the path that makes Seaside
browser/design-aware, which is what you're suggesting, its just not
Seaside's job. Instead the person designing your CSS (even if its
yourself) should handle browser differences there, for example by
including an extra CSS for IE's consumption, which is what we do for our


/* IE6/Win-specific CSS */

@import url("ie6win.css");


Hope this helps,


DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5

boris at deepcovelabs.com


This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any

Thank you.

From: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Rick
Sent: Thursday, November 02, 2006 10:42 AM
To: The Squeak Enterprise Aubergines Server - general discussion.
Subject: [Seaside] Self adjusting CSS (based on browser type) extension


I just tested an app I've been working on (tested mostly in Safari &
Firefox which look fine) but this time tried it on IE6 and it looks
really bad -- mostly due to font differences (fonts are huge which are
causing wrapping) which I've yet to account for in my existing CSS.. It
got me to thinking about ways to have some sort of system in Seaside
were you could specify portable font sizes or types (and whatever else)
in your CSS style methods that Seaside could then translate into the
proper actual CSS code on-the-fly for the specific browser being used..
What I'm thinking is that you could have CSS that looks something like
that shown below in the before/after code :

Before Modification (e.g. plain old CSS)

div#byitem ul.vert 
        list-style-type: none;
        padding: 0;
        margin: 0;
        width: 640px;
        font-size: 9pt;
        font-family: "Courier New", Courier, Arial, sans-serif,

After Modification

div#byitem ul.vert 
        list-style-type: none;
        padding: 0;
        margin: 0;
        width: 640px;
        @font-size: 9pt;
        @font-family: monospace;

This way, some new code in Seaside could see that you're using IE 6 (for
instance -- perhaps IE7 behaves different) and modify the font-size and
font-family accordingly to make something that works better for IE --
e.g. tailoring if you will.  Right now, there's no clean way aside from
doing ugly css hacks to get IE to do what you want without breaking the
formatting for Firefox/Safari,etc.. This way is more programmatic and
you could have a collection of substitutions based on browser type and
keyword or something along those lines.. The nice thing about such a
mechanism is that you could totally skip it if you didn't want to use
it.. Perhaps this is just not needed as there are so many browser quirks
out there -- Anyway, not sure if anyone has any comments on whether this
sounds interesting or not...?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20061102/8d979398/attachment.htm

More information about the Seaside mailing list