Self adjusting CSS (based on browser type) extension to Seaside?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Self adjusting CSS (based on browser type) extension to Seaside?

Rick Flower
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, monospace;
}

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...?

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Self adjusting CSS (based on browser type) extension toSeaside?

Boris Popov, DeepCove Labs (SNN)

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 site,

 

/* IE6/Win-specific CSS */

@import url("ie6win.css");

 

Hope this helps,

-Boris

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

[hidden email]

CONFIDENTIALITY NOTICE

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
attachments.

Thank you.

From: [hidden email] [mailto:[hidden email]] On Behalf Of Rick Flower
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 toSeaside?

 

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, monospace;
}

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...?


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Self adjusting CSS (based on browser type) extension toSeaside?

Rick Flower
Thanks Boris --

I figured I was going to be touching upon a touchy subject here (css
passions seem to run deep from what I've seen), but thought I'd throw it
out there anyway.. ;-)


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Self adjusting CSS (based on browser type) extensiontoSeaside?

Boris Popov, DeepCove Labs (SNN)
Oh absolutely, please don't take my response as a discouragement from
posting your ideas to the list, I was just trying to provide my point of
view on the subject of code and design separation, which indeed is a hot
topic for many out there, see

http://www.alistapart.com/articles/separationdilemma

As you can tell I'm squarely for Seaside dealing with the content and
only content, presentation is something that designers are very good at.

Cheers,

-Boris

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

[hidden email]

CONFIDENTIALITY NOTICE

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
attachments.

Thank you.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Rick
Flower
Sent: Thursday, November 02, 2006 10:50 AM
To: The Squeak Enterprise Aubergines Server - general discussion.
Subject: Re: [Seaside] Self adjusting CSS (based on browser type)
extensiontoSeaside?

Thanks Boris --

I figured I was going to be touching upon a touchy subject here (css
passions seem to run deep from what I've seen), but thought I'd throw it

out there anyway.. ;-)


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Self adjusting CSS (based on browser type) extensiontoSeaside?

Rick Flower
Boris Popov wrote:

> Oh absolutely, please don't take my response as a discouragement from
> posting your ideas to the list, I was just trying to provide my point of
> view on the subject of code and design separation, which indeed is a hot
> topic for many out there, see
>
> http://www.alistapart.com/articles/separationdilemma
>
> As you can tell I'm squarely for Seaside dealing with the content and
> only content, presentation is something that designers are very good at.
>  
No problem.. I figure it wouldn't hurt to at least float the idea.. I'm
certainly not the greatest CSS
designer (I'm much better at coding), and frequently stumble on the
variations that come up with
the css issue and the various browsers available.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Self adjusting CSS (based on browsertype) extensiontoSeaside?

Ron Teitelbaum
Boris,

Thanks for the link.  It was interesting reading.  I'm still trying to get
the hang of CSS myself so I found this interesting.

Rick,

>From Boris's link I found: HTML Dog
http://www.htmldog.com/guides/cssbeginner/text/ 

(c) Patrick Griffiths, 2003-2006.

Home → Tutorials → CSS Beginner Tutorial →

font-family
This is the font itself, such as Times New Roman, Arial, or Verdana.

The font you specify must be on the user's computer, so there is little
point in using obscure fonts. There are a select few 'safe' fonts (the most
commonly used are arial, verdana and times new roman), but you can specify
more than one font, separated by commas. The purpose of this is that if the
user does not have the first font you specify, the browser will go through
the list until it finds one it does have. This is useful because different
computers sometimes have different fonts installed. So font-family: arial,
helvetica, for example, is used so that similar fonts are used on PC (which
traditionally has arial, but not helvetica) and Apple Mac (which,
traditionally, does not have arial and so helvetica, which it does normally
have, will be used).

Note: if the name of a font is more than one word, it should be put in
quotation marks, such as font-family: "Times New Roman".

I thought this might be useful for your problem.

Ron Teitelbaum

> -----Original Message-----
> From: [hidden email] [mailto:seaside-
> [hidden email]] On Behalf Of Rick Flower
> Sent: Thursday, November 02, 2006 1:57 PM
> To: The Squeak Enterprise Aubergines Server - general discussion.
> Subject: Re: [Seaside] Self adjusting CSS (based on browsertype)
> extensiontoSeaside?
>
> Boris Popov wrote:
> > Oh absolutely, please don't take my response as a discouragement from
> > posting your ideas to the list, I was just trying to provide my point of
> > view on the subject of code and design separation, which indeed is a hot
> > topic for many out there, see
> >
> > http://www.alistapart.com/articles/separationdilemma
> >
> > As you can tell I'm squarely for Seaside dealing with the content and
> > only content, presentation is something that designers are very good at.
> >
> No problem.. I figure it wouldn't hurt to at least float the idea.. I'm
> certainly not the greatest CSS
> designer (I'm much better at coding), and frequently stumble on the
> variations that come up with
> the css issue and the various browsers available.
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Self adjusting CSS (based onbrowsertype) extensiontoSeaside?

Boris Popov, DeepCove Labs (SNN)
A List Apart is one of many great resources out there that advocates pro-WebStandards approach, so its worth adding it to your blogroll :)

http://www.alistapart.com/articles/worldgrowssmall
http://www.alistapart.com/articles/separationdilemma
http://www.alistapart.com/articles/seo
http://www.alistapart.com/articles/betterliving
http://www.alistapart.com/articles/separation
http://www.alistapart.com/articles/daemonskin

I could keep going, but really its worth checking out in your spare time.

Cheers,

-Boris

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

[hidden email]

CONFIDENTIALITY NOTICE

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
attachments.

Thank you.

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Ron Teitelbaum
Sent: Thursday, November 02, 2006 11:19 AM
To: 'The Squeak Enterprise Aubergines Server - general discussion.'
Subject: RE: [Seaside] Self adjusting CSS (based onbrowsertype) extensiontoSeaside?

Boris,

Thanks for the link.  It was interesting reading.  I'm still trying to get
the hang of CSS myself so I found this interesting.

Rick,

>From Boris's link I found: HTML Dog
http://www.htmldog.com/guides/cssbeginner/text/ 

(c) Patrick Griffiths, 2003-2006.

Home → Tutorials → CSS Beginner Tutorial →

font-family
This is the font itself, such as Times New Roman, Arial, or Verdana.

The font you specify must be on the user's computer, so there is little
point in using obscure fonts. There are a select few 'safe' fonts (the most
commonly used are arial, verdana and times new roman), but you can specify
more than one font, separated by commas. The purpose of this is that if the
user does not have the first font you specify, the browser will go through
the list until it finds one it does have. This is useful because different
computers sometimes have different fonts installed. So font-family: arial,
helvetica, for example, is used so that similar fonts are used on PC (which
traditionally has arial, but not helvetica) and Apple Mac (which,
traditionally, does not have arial and so helvetica, which it does normally
have, will be used).

Note: if the name of a font is more than one word, it should be put in
quotation marks, such as font-family: "Times New Roman".

I thought this might be useful for your problem.

Ron Teitelbaum

> -----Original Message-----
> From: [hidden email] [mailto:seaside-
> [hidden email]] On Behalf Of Rick Flower
> Sent: Thursday, November 02, 2006 1:57 PM
> To: The Squeak Enterprise Aubergines Server - general discussion.
> Subject: Re: [Seaside] Self adjusting CSS (based on browsertype)
> extensiontoSeaside?
>
> Boris Popov wrote:
> > Oh absolutely, please don't take my response as a discouragement from
> > posting your ideas to the list, I was just trying to provide my point of
> > view on the subject of code and design separation, which indeed is a hot
> > topic for many out there, see
> >
> > http://www.alistapart.com/articles/separationdilemma
> >
> > As you can tell I'm squarely for Seaside dealing with the content and
> > only content, presentation is something that designers are very good at.
> >
> No problem.. I figure it wouldn't hurt to at least float the idea.. I'm
> certainly not the greatest CSS
> designer (I'm much better at coding), and frequently stumble on the
> variations that come up with
> the css issue and the various browsers available.
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Self adjusting CSS (basedonbrowsertype) extensiontoSeaside?

Ron Teitelbaum
Thanks Boris!

Ron

> -----Original Message-----
> From: [hidden email] [mailto:seaside-
> [hidden email]] On Behalf Of Boris Popov
> Sent: Thursday, November 02, 2006 2:28 PM
> To: [hidden email]; The Squeak Enterprise Aubergines Server - general
> discussion.
> Subject: RE: [Seaside] Self adjusting CSS (basedonbrowsertype)
> extensiontoSeaside?
>
> A List Apart is one of many great resources out there that advocates pro-
> WebStandards approach, so its worth adding it to your blogroll :)
>
> http://www.alistapart.com/articles/worldgrowssmall
> http://www.alistapart.com/articles/separationdilemma
> http://www.alistapart.com/articles/seo
> http://www.alistapart.com/articles/betterliving
> http://www.alistapart.com/articles/separation
> http://www.alistapart.com/articles/daemonskin
>
> I could keep going, but really its worth checking out in your spare time.
>
> Cheers,
>
> -Boris
>
> --
> +1.604.689.0322
> DeepCove Labs Ltd.
> 4th floor 595 Howe Street
> Vancouver, Canada V6C 2T5
>
> [hidden email]
>
> CONFIDENTIALITY NOTICE
>
> 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
> attachments.
>
> Thank you.
>
> -----Original Message-----
> From: [hidden email] [mailto:seaside-
> [hidden email]] On Behalf Of Ron Teitelbaum
> Sent: Thursday, November 02, 2006 11:19 AM
> To: 'The Squeak Enterprise Aubergines Server - general discussion.'
> Subject: RE: [Seaside] Self adjusting CSS (based onbrowsertype)
> extensiontoSeaside?
>
> Boris,
>
> Thanks for the link.  It was interesting reading.  I'm still trying to get
> the hang of CSS myself so I found this interesting.
>
> Rick,
>
> >From Boris's link I found: HTML Dog
> http://www.htmldog.com/guides/cssbeginner/text/
>
> (c) Patrick Griffiths, 2003-2006.
>
> Home → Tutorials → CSS Beginner Tutorial →
>
> font-family
> This is the font itself, such as Times New Roman, Arial, or Verdana.
>
> The font you specify must be on the user's computer, so there is little
> point in using obscure fonts. There are a select few 'safe' fonts (the
> most
> commonly used are arial, verdana and times new roman), but you can specify
> more than one font, separated by commas. The purpose of this is that if
> the
> user does not have the first font you specify, the browser will go through
> the list until it finds one it does have. This is useful because different
> computers sometimes have different fonts installed. So font-family: arial,
> helvetica, for example, is used so that similar fonts are used on PC
> (which
> traditionally has arial, but not helvetica) and Apple Mac (which,
> traditionally, does not have arial and so helvetica, which it does
> normally
> have, will be used).
>
> Note: if the name of a font is more than one word, it should be put in
> quotation marks, such as font-family: "Times New Roman".
>
> I thought this might be useful for your problem.
>
> Ron Teitelbaum
>
> > -----Original Message-----
> > From: [hidden email] [mailto:seaside-
> > [hidden email]] On Behalf Of Rick Flower
> > Sent: Thursday, November 02, 2006 1:57 PM
> > To: The Squeak Enterprise Aubergines Server - general discussion.
> > Subject: Re: [Seaside] Self adjusting CSS (based on browsertype)
> > extensiontoSeaside?
> >
> > Boris Popov wrote:
> > > Oh absolutely, please don't take my response as a discouragement from
> > > posting your ideas to the list, I was just trying to provide my point
> of
> > > view on the subject of code and design separation, which indeed is a
> hot
> > > topic for many out there, see
> > >
> > > http://www.alistapart.com/articles/separationdilemma
> > >
> > > As you can tell I'm squarely for Seaside dealing with the content and
> > > only content, presentation is something that designers are very good
> at.
> > >
> > No problem.. I figure it wouldn't hurt to at least float the idea.. I'm
> > certainly not the greatest CSS
> > designer (I'm much better at coding), and frequently stumble on the
> > variations that come up with
> > the css issue and the various browsers available.
> > _______________________________________________
> > Seaside mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Self adjusting CSS (basedonbrowsertype) extensiontoSeaside?

Rick Flower
Ditto.. I've got all of those in my FeedDemon sites list that gets
pinged regularly and have been monitoring them for quite a while now..
If you want to read a REALLY busy mailing list for nothing but CSS
issues, checkout the css-discuss mailing list at "css-discuss.org" --
you can get some great insight from that list (I think most members are
css designers in their day jobs), but there's a ton of traffic on it
daily -- on the order of 100-200 messages per day or so.. I've not been
on it in a while so my comment might be a bit off..

Ron Teitelbaum wrote:

> Thanks Boris!
>
> Ron
>
>  
>> -----Original Message-----
>> From: [hidden email] [mailto:seaside-
>> [hidden email]] On Behalf Of Boris Popov
>> Sent: Thursday, November 02, 2006 2:28 PM
>> To: [hidden email]; The Squeak Enterprise Aubergines Server - general
>> discussion.
>> Subject: RE: [Seaside] Self adjusting CSS (basedonbrowsertype)
>> extensiontoSeaside?
>>
>> A List Apart is one of many great resources out there that advocates pro-
>> WebStandards approach, so its worth adding it to your blogroll :)
>>
>> http://www.alistapart.com/articles/worldgrowssmall
>> http://www.alistapart.com/articles/separationdilemma
>> http://www.alistapart.com/articles/seo
>> http://www.alistapart.com/articles/betterliving
>> http://www.alistapart.com/articles/separation
>> http://www.alistapart.com/articles/daemonskin
>>
>> I could keep going, but really its worth checking out in your spare time.
>>
>> Cheers,
>>
>> -Boris
>>
>> --
>> +1.604.689.0322
>> DeepCove Labs Ltd.
>> 4th floor 595 Howe Street
>> Vancouver, Canada V6C 2T5
>>
>> [hidden email]
>>
>> CONFIDENTIALITY NOTICE
>>
>> 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
>> attachments.
>>
>> Thank you.
>>
>> -----Original Message-----
>> From: [hidden email] [mailto:seaside-
>> [hidden email]] On Behalf Of Ron Teitelbaum
>> Sent: Thursday, November 02, 2006 11:19 AM
>> To: 'The Squeak Enterprise Aubergines Server - general discussion.'
>> Subject: RE: [Seaside] Self adjusting CSS (based onbrowsertype)
>> extensiontoSeaside?
>>
>> Boris,
>>
>> Thanks for the link.  It was interesting reading.  I'm still trying to get
>> the hang of CSS myself so I found this interesting.
>>
>> Rick,
>>
>> >From Boris's link I found: HTML Dog
>> http://www.htmldog.com/guides/cssbeginner/text/
>>
>> (c) Patrick Griffiths, 2003-2006.
>>
>> Home → Tutorials → CSS Beginner Tutorial →
>>
>> font-family
>> This is the font itself, such as Times New Roman, Arial, or Verdana.
>>
>> The font you specify must be on the user's computer, so there is little
>> point in using obscure fonts. There are a select few 'safe' fonts (the
>> most
>> commonly used are arial, verdana and times new roman), but you can specify
>> more than one font, separated by commas. The purpose of this is that if
>> the
>> user does not have the first font you specify, the browser will go through
>> the list until it finds one it does have. This is useful because different
>> computers sometimes have different fonts installed. So font-family: arial,
>> helvetica, for example, is used so that similar fonts are used on PC
>> (which
>> traditionally has arial, but not helvetica) and Apple Mac (which,
>> traditionally, does not have arial and so helvetica, which it does
>> normally
>> have, will be used).
>>
>> Note: if the name of a font is more than one word, it should be put in
>> quotation marks, such as font-family: "Times New Roman".
>>
>> I thought this might be useful for your problem.
>>
>> Ron Teitelbaum
>>
>>    
>>> -----Original Message-----
>>> From: [hidden email] [mailto:seaside-
>>> [hidden email]] On Behalf Of Rick Flower
>>> Sent: Thursday, November 02, 2006 1:57 PM
>>> To: The Squeak Enterprise Aubergines Server - general discussion.
>>> Subject: Re: [Seaside] Self adjusting CSS (based on browsertype)
>>> extensiontoSeaside?
>>>
>>> Boris Popov wrote:
>>>      
>>>> Oh absolutely, please don't take my response as a discouragement from
>>>> posting your ideas to the list, I was just trying to provide my point
>>>>        
>> of
>>    
>>>> view on the subject of code and design separation, which indeed is a
>>>>        
>> hot
>>    
>>>> topic for many out there, see
>>>>
>>>> http://www.alistapart.com/articles/separationdilemma
>>>>
>>>> As you can tell I'm squarely for Seaside dealing with the content and
>>>> only content, presentation is something that designers are very good
>>>>        
>> at.
>>    
>>> No problem.. I figure it wouldn't hurt to at least float the idea.. I'm
>>> certainly not the greatest CSS
>>> designer (I'm much better at coding), and frequently stumble on the
>>> variations that come up with
>>> the css issue and the various browsers available.
>>> _______________________________________________
>>> Seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>      
>> _______________________________________________
>> Seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> _______________________________________________
>> Seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>    
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>  

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Self adjusting CSS (based on browser type) extension to Seaside?

Jason Johnson-3
In reply to this post by Rick Flower
I disagree that seaside itself needs to know about this or how to do it,
but it is trivial to sniff the browser yourself from inside seaside (I
don't remember what class to subclass, something "root" I think.  I will
dig it up for you if you need me to).

Rick Flower wrote:

> 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, monospace;
> }
>
> *_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...?
> ------------------------------------------------------------------------
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>  

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Self adjusting CSS (based on browser type) extension to Seaside?

Rick Flower
Jason Johnson wrote:
> I disagree that seaside itself needs to know about this or how to do it,
> but it is trivial to sniff the browser yourself from inside seaside (I
> don't remember what class to subclass, something "root" I think.  I will
> dig it up for you if you need me to).

Thanks Jason -- I've got that info, but just wanted to float an idea.. I
doubt that I'll pursue it though.


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside