You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adrian Crum <ad...@hlmksw.com> on 2007/01/12 22:42:26 UTC

maincss.css question

In the maincss.css file, Just below the comment

/* ===== Product Detail Styles ===== */

are six css classes defined using IDs instead of class names. Is there a reason 
for that?



Re: maincss.css question

Posted by Jacques Le Roux <ja...@les7arts.com>.
About this subject and books reading, I think it is worth to take a look at least at the chapter 13 of Designing with Web Standards
from Jeffrey Zeldman
http://www.amazon.com/Designing-Web-Standards-Jeffrey-Zeldman/dp/0735712018/ref=ed_oe_p/105-6697130-6475607
(I read only the 1st and french edition). This chapter is only 30 pages but there are some interesting tips for this kind of
problems. It speaks about pixels, em, etc.

Jacques

----- Original Message ----- 
From: "Adrian Crum" <ad...@hlmksw.com>
To: <de...@ofbiz.apache.org>
Sent: Saturday, January 13, 2007 12:10 AM
Subject: Re: maincss.css question


> Thanks for the reminder Daniel! I was going to get to that next. If you try out
> the file I attached, you'll see there are still a few small issues I need to
> work out. So, it's a work in progress.
>
>
> Daniel Kunkel wrote:
>
> > Hi Adrian
> >
> > This is great, but I think Chris Howe had a great idea a little while
> > back when he talked about defining text in em so browsers can adjust the
> > font size.
> >
> > Thanks
> >
> > Daniel
> >
> > -----
> >
> > This is a vague recollection of things read/done on
> > css. Instead of setting the font size in pixels, you
> > "should" use em units.  The most common approach is
> > the following:
> >
> > BODY {
> > font-size: 62.5%;
> > }
> >
> > This makes 16px = 10px and so now:
> > 0.8 em = 8 px
> > 1 em = 10px
> > 1.2 em = 12 px
> > 1.4 em = 14 px
> >
> > and so forth.  em instead of pixels is used because
> > IE/Win doesn't allow the user to resize text that is
> > set in px.  This may or may not have been
> > fixed/changed in IE7, but it's a much easier
> > convention to apply consistently than is pixels.
> >
> >
> >
> > ----
> >
> > On Fri, 2007-01-12 at 14:17 -0800, Adrian Crum wrote:
> >
> >>I've spent the last two days consolidating the two main css files and cleaning
> >>up the target file. There were a lot of duplicate and unnecessary assignments. I
> >>also found font sizes expressed in points AND pixels, so I changed them all to
> >>pixels. I also changed color names to color values - so that a simple global
> >>replacement of color values will change the look of the site.
> >>
> >>So far, the new maincss.css file renders almost exactly the same. The only
> >>difference seems to be in INPUT box widths.
> >>
> >>I have attached what I've done so far - if you'd like to take a look at it.
> >>
> >>Thanks for the book recommendation, btw. I'll definitely pick up a book or two.
> >>So far I've been able to answer all of my questions with online CSS references.
> >>
> >>
> >>David E. Jones wrote:
> >>
> >>
> >>>Adrian,
> >>>
> >>>I see, no problem. Yeah, it was a project started and never finished!
> >>>
> >>>You'll probably also notice that there is still some table-based
> >>>formatting on the productdetail page that is a bit evil (well, and
> >>>ugly!) and needs to be converted to a CSS-based layout like much of  the
> >>>other stuff was.
> >>>
> >>>-David
> >>>
> >>>
> >>>On Jan 12, 2007, at 2:56 PM, Adrian Crum wrote:
> >>>
> >>>
> >>>>David,
> >>>>
> >>>>Thanks for the reply! I understand completely what the ID attribute
> >>>>is for. I was questioning why it was done differently than the rest
> >>>>of the file.
> >>>>
> >>>>
> >>>>David E. Jones wrote:
> >>>>
> >>>>
> >>>>>This was part of the experimentation with the Zen CSS Garden way  of
> >>>>>doing CSS. Using id attributes to mark regions and styling
> >>>>>implicitly  is the way we want to go in the future. If you're
> >>>>>planning on working  on CSS stuff and you haven't read through The
> >>>>>Zen of CSS Design, I  highly recommend it. Really cool stuff.  There
> >>>>>is a link to the book  on the Docs & Books page on  ofbiz.apache.org.
> >>>>>-David
> >>>>>On Jan 12, 2007, at 2:42 PM, Adrian Crum wrote:
> >>>>>
> >>>>>
> >>>>>>In the maincss.css file, Just below the comment
> >>>>>>
> >>>>>>/* ===== Product Detail Styles ===== */
> >>>>>>
> >>>>>>are six css classes defined using IDs instead of class names. Is
> >>>>>>there a reason for that?
> >>>>>>
> >>>>>>
> >>>
> >>>
> >
> >


Re: maincss.css question

Posted by Adrian Crum <ad...@hlmksw.com>.
Thanks for the reminder Daniel! I was going to get to that next. If you try out 
the file I attached, you'll see there are still a few small issues I need to 
work out. So, it's a work in progress.


Daniel Kunkel wrote:

> Hi Adrian
> 
> This is great, but I think Chris Howe had a great idea a little while
> back when he talked about defining text in em so browsers can adjust the
> font size.
> 
> Thanks
> 
> Daniel
> 
> -----
> 
> This is a vague recollection of things read/done on
> css. Instead of setting the font size in pixels, you
> "should" use em units.  The most common approach is
> the following:
> 
> BODY {
> font-size: 62.5%;
> }
> 
> This makes 16px = 10px and so now:
> 0.8 em = 8 px
> 1 em = 10px
> 1.2 em = 12 px
> 1.4 em = 14 px
> 
> and so forth.  em instead of pixels is used because
> IE/Win doesn't allow the user to resize text that is
> set in px.  This may or may not have been
> fixed/changed in IE7, but it's a much easier
> convention to apply consistently than is pixels.
> 
> 
> 
> ----
> 
> On Fri, 2007-01-12 at 14:17 -0800, Adrian Crum wrote:
> 
>>I've spent the last two days consolidating the two main css files and cleaning 
>>up the target file. There were a lot of duplicate and unnecessary assignments. I 
>>also found font sizes expressed in points AND pixels, so I changed them all to 
>>pixels. I also changed color names to color values - so that a simple global 
>>replacement of color values will change the look of the site.
>>
>>So far, the new maincss.css file renders almost exactly the same. The only 
>>difference seems to be in INPUT box widths.
>>
>>I have attached what I've done so far - if you'd like to take a look at it.
>>
>>Thanks for the book recommendation, btw. I'll definitely pick up a book or two. 
>>So far I've been able to answer all of my questions with online CSS references.
>>
>>
>>David E. Jones wrote:
>>
>>
>>>Adrian,
>>>
>>>I see, no problem. Yeah, it was a project started and never finished!
>>>
>>>You'll probably also notice that there is still some table-based  
>>>formatting on the productdetail page that is a bit evil (well, and  
>>>ugly!) and needs to be converted to a CSS-based layout like much of  the 
>>>other stuff was.
>>>
>>>-David
>>>
>>>
>>>On Jan 12, 2007, at 2:56 PM, Adrian Crum wrote:
>>>
>>>
>>>>David,
>>>>
>>>>Thanks for the reply! I understand completely what the ID attribute  
>>>>is for. I was questioning why it was done differently than the rest  
>>>>of the file.
>>>>
>>>>
>>>>David E. Jones wrote:
>>>>
>>>>
>>>>>This was part of the experimentation with the Zen CSS Garden way  of  
>>>>>doing CSS. Using id attributes to mark regions and styling  
>>>>>implicitly  is the way we want to go in the future. If you're  
>>>>>planning on working  on CSS stuff and you haven't read through The  
>>>>>Zen of CSS Design, I  highly recommend it. Really cool stuff.  There 
>>>>>is a link to the book  on the Docs & Books page on  ofbiz.apache.org.
>>>>>-David
>>>>>On Jan 12, 2007, at 2:42 PM, Adrian Crum wrote:
>>>>>
>>>>>
>>>>>>In the maincss.css file, Just below the comment
>>>>>>
>>>>>>/* ===== Product Detail Styles ===== */
>>>>>>
>>>>>>are six css classes defined using IDs instead of class names. Is   
>>>>>>there a reason for that?
>>>>>>
>>>>>>
>>>
>>>
> 
> 

Re: maincss.css question

Posted by Daniel Kunkel <Da...@BioWaves.com>.
Hi Adrian

This is great, but I think Chris Howe had a great idea a little while
back when he talked about defining text in em so browsers can adjust the
font size.

Thanks

Daniel

-----

This is a vague recollection of things read/done on
css. Instead of setting the font size in pixels, you
"should" use em units.  The most common approach is
the following:

BODY {
font-size: 62.5%;
}

This makes 16px = 10px and so now:
0.8 em = 8 px
1 em = 10px
1.2 em = 12 px
1.4 em = 14 px

and so forth.  em instead of pixels is used because
IE/Win doesn't allow the user to resize text that is
set in px.  This may or may not have been
fixed/changed in IE7, but it's a much easier
convention to apply consistently than is pixels.



----

On Fri, 2007-01-12 at 14:17 -0800, Adrian Crum wrote:
> I've spent the last two days consolidating the two main css files and cleaning 
> up the target file. There were a lot of duplicate and unnecessary assignments. I 
> also found font sizes expressed in points AND pixels, so I changed them all to 
> pixels. I also changed color names to color values - so that a simple global 
> replacement of color values will change the look of the site.
> 
> So far, the new maincss.css file renders almost exactly the same. The only 
> difference seems to be in INPUT box widths.
> 
> I have attached what I've done so far - if you'd like to take a look at it.
> 
> Thanks for the book recommendation, btw. I'll definitely pick up a book or two. 
> So far I've been able to answer all of my questions with online CSS references.
> 
> 
> David E. Jones wrote:
> 
> > 
> > Adrian,
> > 
> > I see, no problem. Yeah, it was a project started and never finished!
> > 
> > You'll probably also notice that there is still some table-based  
> > formatting on the productdetail page that is a bit evil (well, and  
> > ugly!) and needs to be converted to a CSS-based layout like much of  the 
> > other stuff was.
> > 
> > -David
> > 
> > 
> > On Jan 12, 2007, at 2:56 PM, Adrian Crum wrote:
> > 
> >> David,
> >>
> >> Thanks for the reply! I understand completely what the ID attribute  
> >> is for. I was questioning why it was done differently than the rest  
> >> of the file.
> >>
> >>
> >> David E. Jones wrote:
> >>
> >>> This was part of the experimentation with the Zen CSS Garden way  of  
> >>> doing CSS. Using id attributes to mark regions and styling  
> >>> implicitly  is the way we want to go in the future. If you're  
> >>> planning on working  on CSS stuff and you haven't read through The  
> >>> Zen of CSS Design, I  highly recommend it. Really cool stuff.  There 
> >>> is a link to the book  on the Docs & Books page on  ofbiz.apache.org.
> >>> -David
> >>> On Jan 12, 2007, at 2:42 PM, Adrian Crum wrote:
> >>>
> >>>> In the maincss.css file, Just below the comment
> >>>>
> >>>> /* ===== Product Detail Styles ===== */
> >>>>
> >>>> are six css classes defined using IDs instead of class names. Is   
> >>>> there a reason for that?
> >>>>
> >>>>
> > 
> > 


Re: maincss.css question

Posted by Adrian Crum <ad...@hlmksw.com>.
I've spent the last two days consolidating the two main css files and cleaning 
up the target file. There were a lot of duplicate and unnecessary assignments. I 
also found font sizes expressed in points AND pixels, so I changed them all to 
pixels. I also changed color names to color values - so that a simple global 
replacement of color values will change the look of the site.

So far, the new maincss.css file renders almost exactly the same. The only 
difference seems to be in INPUT box widths.

I have attached what I've done so far - if you'd like to take a look at it.

Thanks for the book recommendation, btw. I'll definitely pick up a book or two. 
So far I've been able to answer all of my questions with online CSS references.


David E. Jones wrote:

> 
> Adrian,
> 
> I see, no problem. Yeah, it was a project started and never finished!
> 
> You'll probably also notice that there is still some table-based  
> formatting on the productdetail page that is a bit evil (well, and  
> ugly!) and needs to be converted to a CSS-based layout like much of  the 
> other stuff was.
> 
> -David
> 
> 
> On Jan 12, 2007, at 2:56 PM, Adrian Crum wrote:
> 
>> David,
>>
>> Thanks for the reply! I understand completely what the ID attribute  
>> is for. I was questioning why it was done differently than the rest  
>> of the file.
>>
>>
>> David E. Jones wrote:
>>
>>> This was part of the experimentation with the Zen CSS Garden way  of  
>>> doing CSS. Using id attributes to mark regions and styling  
>>> implicitly  is the way we want to go in the future. If you're  
>>> planning on working  on CSS stuff and you haven't read through The  
>>> Zen of CSS Design, I  highly recommend it. Really cool stuff.  There 
>>> is a link to the book  on the Docs & Books page on  ofbiz.apache.org.
>>> -David
>>> On Jan 12, 2007, at 2:42 PM, Adrian Crum wrote:
>>>
>>>> In the maincss.css file, Just below the comment
>>>>
>>>> /* ===== Product Detail Styles ===== */
>>>>
>>>> are six css classes defined using IDs instead of class names. Is   
>>>> there a reason for that?
>>>>
>>>>
> 
> 

Re: maincss.css question

Posted by "David E. Jones" <jo...@hotwaxmedia.com>.
On Jan 15, 2007, at 4:49 PM, Adrian Crum wrote:

> If a new design approach results in greatly reduced code, how do  
> you present that approach to the community without presenting the  
> greatly reduced code?

Easy. Start with an example, a small localized change that  
demonstrates your idea. Submit it as a patch, get feedback, and get  
others to help you apply it more generally.

This happens over and over in a project like OFBiz, and has happened  
many thousands of times. Even the core committers work with each  
other this way.

-David


Re: maincss.css question

Posted by Adrian Crum <ad...@hlmksw.com>.
Understood. I'm still inclined to present the "finished product" and then see 
what incremental steps should be taken to get there.

Btw, the maincss.css file I have will drop into any OFBiz installation and work. 
It doesn't need any additional modifications. It doesn't change the L&F in any 
way. It's just smaller and more efficient.


Tim Ruppert wrote:

> I feel you - especially when talking about something like this.  If it 
> were me, I'd probably present a new file - and a particular screen that 
> you did in this style.  Once you find adoption, it'll be easy to get 
> people behind it.  But just beware of trying to fix too much - I think 
> that's the only warning here :)
> 
> Cheers,
> Tim
> --
> Tim Ruppert
> HotWax Media
> http://www.hotwaxmedia.com
> 
> o:801.649.6594
> f:801.649.6595
> 
> 
> On Jan 15, 2007, at 4:49 PM, Adrian Crum wrote:
> 
>> Thanks you for the clarification Tim.
>>
>> In this particular case, even a minor change to the maincss.css file 
>> results in many modifications. For instance, setting a default font 
>> style removes a ton of code. Same thing with setting default styles 
>> for basic HTML elements.
>>
>> If a new design approach results in greatly reduced code, how do you 
>> present that approach to the community without presenting the greatly 
>> reduced code?
>>
>> -Adrian
>>
>> Tim Ruppert wrote:
>>
>>> Regardless, what I think that David is asking you to do was take the 
>>> modifications in small chunks - instead of trying to do everything 
>>> all at once.  That way regardless of whether or not it's a patch or 
>>> attached to an email - it's easily reviewable by people.
>>> Cheers,
>>> Tim
>>> --
>>> Tim Ruppert
>>> HotWax Media
>>> http://www.hotwaxmedia.com
>>> o:801.649.6594
>>> f:801.649.6595
>>> On Jan 15, 2007, at 4:21 PM, Adrian Crum wrote:
>>>
>>>> David E. Jones wrote:
>>>>
>>>>> BTW, I plead and beg on my knees Adrian: don't try to make massive  
>>>>> changes and submit huge patches! Please! Please! PLEASE! I beg of  
>>>>> you! Please try to keep patches more granular and to address a 
>>>>> single  issue that can be easily reviewed by committers.
>>>>> This is important for smooth progress in the project. I'm rather  
>>>>> concerned right now with the approach various people are trying to  
>>>>> take to contribute to OFBiz, and the lack of good review on the 
>>>>> part  of committers. Following the above plea will help 
>>>>> significantly with  this, and it will get your patches reviewed and 
>>>>> committed far more  quickly, and the patches from others committed 
>>>>> more quickly and  without causing so many negative side-effects for 
>>>>> what you are trying  to do with OFBiz.
>>>>
>>>>
>>>>
>>>> Relax. I wasn't planning on submitting a patch. I was going to 
>>>> attach the modified css file to an upcoming email to get community 
>>>> comments.
>>>>
>>>>
> 

Re: maincss.css question

Posted by "David E. Jones" <jo...@hotwaxmedia.com>.
On Jan 15, 2007, at 4:49 PM, Adrian Crum wrote:

> In this particular case, even a minor change to the maincss.css  
> file results in many modifications. For instance, setting a default  
> font style removes a ton of code. Same thing with setting default  
> styles for basic HTML elements.

The best thing to do here is again keep the patch as simple as  
possible. You can make changes to a lot of files, just make SURE  
those are the only changes in the files, and try to limit it to maybe  
2-3 such changes in a patch to make it easier to skim.

-David


Re: maincss.css question

Posted by Tim Ruppert <ti...@hotwaxmedia.com>.
I feel you - especially when talking about something like this.  If  
it were me, I'd probably present a new file - and a particular screen  
that you did in this style.  Once you find adoption, it'll be easy to  
get people behind it.  But just beware of trying to fix too much - I  
think that's the only warning here :)

Cheers,
Tim
--
Tim Ruppert
HotWax Media
http://www.hotwaxmedia.com

o:801.649.6594
f:801.649.6595


On Jan 15, 2007, at 4:49 PM, Adrian Crum wrote:

> Thanks you for the clarification Tim.
>
> In this particular case, even a minor change to the maincss.css  
> file results in many modifications. For instance, setting a default  
> font style removes a ton of code. Same thing with setting default  
> styles for basic HTML elements.
>
> If a new design approach results in greatly reduced code, how do  
> you present that approach to the community without presenting the  
> greatly reduced code?
>
> -Adrian
>
> Tim Ruppert wrote:
>
>> Regardless, what I think that David is asking you to do was take  
>> the modifications in small chunks - instead of trying to do  
>> everything all at once.  That way regardless of whether or not  
>> it's a patch or attached to an email - it's easily reviewable by  
>> people.
>> Cheers,
>> Tim
>> --
>> Tim Ruppert
>> HotWax Media
>> http://www.hotwaxmedia.com
>> o:801.649.6594
>> f:801.649.6595
>> On Jan 15, 2007, at 4:21 PM, Adrian Crum wrote:
>>> David E. Jones wrote:
>>>
>>>> BTW, I plead and beg on my knees Adrian: don't try to make  
>>>> massive  changes and submit huge patches! Please! Please!  
>>>> PLEASE! I beg of  you! Please try to keep patches more granular  
>>>> and to address a single  issue that can be easily reviewed by  
>>>> committers.
>>>> This is important for smooth progress in the project. I'm  
>>>> rather  concerned right now with the approach various people are  
>>>> trying to  take to contribute to OFBiz, and the lack of good  
>>>> review on the part  of committers. Following the above plea will  
>>>> help significantly with  this, and it will get your patches  
>>>> reviewed and committed far more  quickly, and the patches from  
>>>> others committed more quickly and  without causing so many  
>>>> negative side-effects for what you are trying  to do with OFBiz.
>>>
>>>
>>> Relax. I wasn't planning on submitting a patch. I was going to  
>>> attach the modified css file to an upcoming email to get  
>>> community comments.
>>>
>>>


Re: maincss.css question

Posted by Adrian Crum <ad...@hlmksw.com>.
Thanks you for the clarification Tim.

In this particular case, even a minor change to the maincss.css file results in 
many modifications. For instance, setting a default font style removes a ton of 
code. Same thing with setting default styles for basic HTML elements.

If a new design approach results in greatly reduced code, how do you present 
that approach to the community without presenting the greatly reduced code?

-Adrian

Tim Ruppert wrote:

> Regardless, what I think that David is asking you to do was take the 
> modifications in small chunks - instead of trying to do everything all 
> at once.  That way regardless of whether or not it's a patch or attached 
> to an email - it's easily reviewable by people.
> 
> Cheers,
> Tim
> --
> Tim Ruppert
> HotWax Media
> http://www.hotwaxmedia.com
> 
> o:801.649.6594
> f:801.649.6595
> 
> 
> On Jan 15, 2007, at 4:21 PM, Adrian Crum wrote:
> 
>> David E. Jones wrote:
>>
>>> BTW, I plead and beg on my knees Adrian: don't try to make massive  
>>> changes and submit huge patches! Please! Please! PLEASE! I beg of  
>>> you! Please try to keep patches more granular and to address a 
>>> single  issue that can be easily reviewed by committers.
>>> This is important for smooth progress in the project. I'm rather  
>>> concerned right now with the approach various people are trying to  
>>> take to contribute to OFBiz, and the lack of good review on the part  
>>> of committers. Following the above plea will help significantly with  
>>> this, and it will get your patches reviewed and committed far more  
>>> quickly, and the patches from others committed more quickly and  
>>> without causing so many negative side-effects for what you are 
>>> trying  to do with OFBiz.
>>
>>
>> Relax. I wasn't planning on submitting a patch. I was going to attach 
>> the modified css file to an upcoming email to get community comments.
>>
>>
> 

Re: maincss.css question

Posted by Tim Ruppert <ti...@hotwaxmedia.com>.
Regardless, what I think that David is asking you to do was take the  
modifications in small chunks - instead of trying to do everything  
all at once.  That way regardless of whether or not it's a patch or  
attached to an email - it's easily reviewable by people.

Cheers,
Tim
--
Tim Ruppert
HotWax Media
http://www.hotwaxmedia.com

o:801.649.6594
f:801.649.6595


On Jan 15, 2007, at 4:21 PM, Adrian Crum wrote:

> David E. Jones wrote:
>> BTW, I plead and beg on my knees Adrian: don't try to make  
>> massive  changes and submit huge patches! Please! Please! PLEASE!  
>> I beg of  you! Please try to keep patches more granular and to  
>> address a single  issue that can be easily reviewed by committers.
>> This is important for smooth progress in the project. I'm rather   
>> concerned right now with the approach various people are trying  
>> to  take to contribute to OFBiz, and the lack of good review on  
>> the part  of committers. Following the above plea will help  
>> significantly with  this, and it will get your patches reviewed  
>> and committed far more  quickly, and the patches from others  
>> committed more quickly and  without causing so many negative side- 
>> effects for what you are trying  to do with OFBiz.
>
> Relax. I wasn't planning on submitting a patch. I was going to  
> attach the modified css file to an upcoming email to get community  
> comments.
>
>


Re: maincss.css question

Posted by Adrian Crum <ad...@hlmksw.com>.
David E. Jones wrote:
> BTW, I plead and beg on my knees Adrian: don't try to make massive  
> changes and submit huge patches! Please! Please! PLEASE! I beg of  you! 
> Please try to keep patches more granular and to address a single  issue 
> that can be easily reviewed by committers.
> 
> This is important for smooth progress in the project. I'm rather  
> concerned right now with the approach various people are trying to  take 
> to contribute to OFBiz, and the lack of good review on the part  of 
> committers. Following the above plea will help significantly with  this, 
> and it will get your patches reviewed and committed far more  quickly, 
> and the patches from others committed more quickly and  without causing 
> so many negative side-effects for what you are trying  to do with OFBiz.

Relax. I wasn't planning on submitting a patch. I was going to attach the 
modified css file to an upcoming email to get community comments.



Re: maincss.css question

Posted by "David E. Jones" <jo...@hotwaxmedia.com>.
On Jan 15, 2007, at 8:39 AM, Adrian Crum wrote:

> David E. Jones wrote:
>> Actually, the point of this sort of CSS pattern is what you  
>> described  as the bad side effect, ie having the style tied to the  
>> content.
>> If we have anything generic, it should be attached to generic  
>> tags,  not a messy and confusing and difficult to maintain library  
>> of styles  like we have now.
>
> I just spent the entire weekend slimming down and organizing the  
> maincss.css file. I'm sure it will help eliminate some of the style  
> confusion. I'll post it soon.
>
>> If we put an id on a div around a product summary block, we don't   
>> HAVE to use that in our stock CSS file, but the fact that it is  
>> there  makes it possible to do something special visually with  
>> that section  without any change to the FTL file.
>
> So, you're saying content-specific styles should stay in the main  
> stylesheet? I apologize if I appear dense, I'm just trying to make  
> sure I understand you correctly before I proceed any further.

Yes, might as well have them all in one file. I think that's much  
easier to manage, and makes it easy for the browser to cache.

BTW, I plead and beg on my knees Adrian: don't try to make massive  
changes and submit huge patches! Please! Please! PLEASE! I beg of  
you! Please try to keep patches more granular and to address a single  
issue that can be easily reviewed by committers.

This is important for smooth progress in the project. I'm rather  
concerned right now with the approach various people are trying to  
take to contribute to OFBiz, and the lack of good review on the part  
of committers. Following the above plea will help significantly with  
this, and it will get your patches reviewed and committed far more  
quickly, and the patches from others committed more quickly and  
without causing so many negative side-effects for what you are trying  
to do with OFBiz.

-David



Re: maincss.css question

Posted by Adrian Crum <ad...@hlmksw.com>.
David E. Jones wrote:
> Actually, the point of this sort of CSS pattern is what you described  
> as the bad side effect, ie having the style tied to the content.
> 
> If we have anything generic, it should be attached to generic tags,  not 
> a messy and confusing and difficult to maintain library of styles  like 
> we have now.

I just spent the entire weekend slimming down and organizing the maincss.css 
file. I'm sure it will help eliminate some of the style confusion. I'll post it 
soon.

> If we put an id on a div around a product summary block, we don't  HAVE 
> to use that in our stock CSS file, but the fact that it is there  makes 
> it possible to do something special visually with that section  without 
> any change to the FTL file.

So, you're saying content-specific styles should stay in the main stylesheet? I 
apologize if I appear dense, I'm just trying to make sure I understand you 
correctly before I proceed any further.


Re: maincss.css question

Posted by Adrian Crum <ad...@hlmksw.com>.
I just spent this last weekend refactoring the Party Manager findParty and 
viewProfile pages as a way to test the HTML/CSS coding guidelines that I'm 
working on. (That work was an experiment - not intended to be put in the main 
project.) Now I can fully appreciate the decisions that need to go into creating 
and naming CSS classes.

After doing that, I've come up with a personal opinion on web design and OFBiz. 
The CSS Zen Garden is a great inspiration and a goal to shoot for, but I don't 
believe it can be fully acheived in OFBiz. That's because the whole point of the 
CSS Zen Garden was to get designers to think outside of the "row and column 
grid" and design pages that flow artistically. OFBiz web pages aren't 
free-flowing artistic displays - they display a business application that, by 
its nature, requires some structure. The bottom line is, we can draw from the 
Garden's inspiration and produce more concise HTML and more flexible layouts, 
but we'll fall short of making OFBiz another CSS Zen Garden.

Having said that, I'm really excited about the prospects of the CSS/HTML 
refactoring initiative. The Party Manager mods I made resulted in greatly 
reduced FTL file sizes, and it outputs the coolest minimal markup. Everything 
resizes and reverses direction elegantly. I'll post a patch in the "sandbox" 
Jira issue (https://issues.apache.org/jira/browse/OFBIZ-633) soon so others can 
see what I mean.

The CSS/HTML Guidelines RFC will be posted today - I'm almost done with it.

-Adrian


David E. Jones wrote:

> 
> Actually, the point of this sort of CSS pattern is what you described  
> as the bad side effect, ie having the style tied to the content.
> 
> If we have anything generic, it should be attached to generic tags,  not 
> a messy and confusing and difficult to maintain library of styles  like 
> we have now.
> 
> If we put an id on a div around a product summary block, we don't  HAVE 
> to use that in our stock CSS file, but the fact that it is there  makes 
> it possible to do something special visually with that section  without 
> any change to the FTL file.
> 
> And _that_ is what we're going for... and that's what the examples  and 
> patterns in the CSS Zen Garden stuff are all about.
> 
> -David
> 
> 
> On Jan 12, 2007, at 6:36 PM, Adrian Crum wrote:
> 
>> Now that I know that that section of the css file was an  experiment, 
>> I'd like to offer my perspective on that particular  section.
>>
>> It seems to me that those product detail styles tie style to  content 
>> too closely. In other words, they are pretty content specific.
>>
>> I see the maincss.css file as being a global "palette" of styles  that 
>> all components can draw from. If a particular component needs  a style 
>> that is unavailable from the maincss.css file, then those  styles 
>> should be kept in a separate style sheet that only that  component 
>> loads (via layoutSettings.stylesheets[]).
>>
>> Am I on the right track?
>>
>>
>> David E. Jones wrote:
>>
>>> Adrian,
>>> I see, no problem. Yeah, it was a project started and never finished!
>>> You'll probably also notice that there is still some table-based   
>>> formatting on the productdetail page that is a bit evil (well,  and  
>>> ugly!) and needs to be converted to a CSS-based layout like  much of  
>>> the other stuff was.
>>> -David
>>> On Jan 12, 2007, at 2:56 PM, Adrian Crum wrote:
>>>
>>>> David,
>>>>
>>>> Thanks for the reply! I understand completely what the ID  
>>>> attribute  is for. I was questioning why it was done differently  
>>>> than the rest  of the file.
>>>>
>>>>
>>>> David E. Jones wrote:
>>>>
>>>>> This was part of the experimentation with the Zen CSS Garden  way  
>>>>> of  doing CSS. Using id attributes to mark regions and  styling  
>>>>> implicitly  is the way we want to go in the future. If  you're  
>>>>> planning on working  on CSS stuff and you haven't read  through 
>>>>> The  Zen of CSS Design, I  highly recommend it. Really  cool 
>>>>> stuff.  There is a link to the book  on the Docs & Books  page on  
>>>>> ofbiz.apache.org.
>>>>> -David
>>>>> On Jan 12, 2007, at 2:42 PM, Adrian Crum wrote:
>>>>>
>>>>>> In the maincss.css file, Just below the comment
>>>>>>
>>>>>> /* ===== Product Detail Styles ===== */
>>>>>>
>>>>>> are six css classes defined using IDs instead of class names.  
>>>>>> Is   there a reason for that?
>>>>>>
>>>>>>
> 

Re: maincss.css question

Posted by "David E. Jones" <jo...@hotwaxmedia.com>.
Actually, the point of this sort of CSS pattern is what you described  
as the bad side effect, ie having the style tied to the content.

If we have anything generic, it should be attached to generic tags,  
not a messy and confusing and difficult to maintain library of styles  
like we have now.

If we put an id on a div around a product summary block, we don't  
HAVE to use that in our stock CSS file, but the fact that it is there  
makes it possible to do something special visually with that section  
without any change to the FTL file.

And _that_ is what we're going for... and that's what the examples  
and patterns in the CSS Zen Garden stuff are all about.

-David


On Jan 12, 2007, at 6:36 PM, Adrian Crum wrote:

> Now that I know that that section of the css file was an  
> experiment, I'd like to offer my perspective on that particular  
> section.
>
> It seems to me that those product detail styles tie style to  
> content too closely. In other words, they are pretty content specific.
>
> I see the maincss.css file as being a global "palette" of styles  
> that all components can draw from. If a particular component needs  
> a style that is unavailable from the maincss.css file, then those  
> styles should be kept in a separate style sheet that only that  
> component loads (via layoutSettings.stylesheets[]).
>
> Am I on the right track?
>
>
> David E. Jones wrote:
>
>> Adrian,
>> I see, no problem. Yeah, it was a project started and never finished!
>> You'll probably also notice that there is still some table-based   
>> formatting on the productdetail page that is a bit evil (well,  
>> and  ugly!) and needs to be converted to a CSS-based layout like  
>> much of  the other stuff was.
>> -David
>> On Jan 12, 2007, at 2:56 PM, Adrian Crum wrote:
>>> David,
>>>
>>> Thanks for the reply! I understand completely what the ID  
>>> attribute  is for. I was questioning why it was done differently  
>>> than the rest  of the file.
>>>
>>>
>>> David E. Jones wrote:
>>>
>>>> This was part of the experimentation with the Zen CSS Garden  
>>>> way  of  doing CSS. Using id attributes to mark regions and  
>>>> styling  implicitly  is the way we want to go in the future. If  
>>>> you're  planning on working  on CSS stuff and you haven't read  
>>>> through The  Zen of CSS Design, I  highly recommend it. Really  
>>>> cool stuff.  There is a link to the book  on the Docs & Books  
>>>> page on  ofbiz.apache.org.
>>>> -David
>>>> On Jan 12, 2007, at 2:42 PM, Adrian Crum wrote:
>>>>
>>>>> In the maincss.css file, Just below the comment
>>>>>
>>>>> /* ===== Product Detail Styles ===== */
>>>>>
>>>>> are six css classes defined using IDs instead of class names.  
>>>>> Is   there a reason for that?
>>>>>
>>>>>


Re: maincss.css question

Posted by Adrian Crum <ad...@hlmksw.com>.
Now that I know that that section of the css file was an experiment, I'd like to 
offer my perspective on that particular section.

It seems to me that those product detail styles tie style to content too 
closely. In other words, they are pretty content specific.

I see the maincss.css file as being a global "palette" of styles that all 
components can draw from. If a particular component needs a style that is 
unavailable from the maincss.css file, then those styles should be kept in a 
separate style sheet that only that component loads (via 
layoutSettings.stylesheets[]).

Am I on the right track?


David E. Jones wrote:

> 
> Adrian,
> 
> I see, no problem. Yeah, it was a project started and never finished!
> 
> You'll probably also notice that there is still some table-based  
> formatting on the productdetail page that is a bit evil (well, and  
> ugly!) and needs to be converted to a CSS-based layout like much of  the 
> other stuff was.
> 
> -David
> 
> 
> On Jan 12, 2007, at 2:56 PM, Adrian Crum wrote:
> 
>> David,
>>
>> Thanks for the reply! I understand completely what the ID attribute  
>> is for. I was questioning why it was done differently than the rest  
>> of the file.
>>
>>
>> David E. Jones wrote:
>>
>>> This was part of the experimentation with the Zen CSS Garden way  of  
>>> doing CSS. Using id attributes to mark regions and styling  
>>> implicitly  is the way we want to go in the future. If you're  
>>> planning on working  on CSS stuff and you haven't read through The  
>>> Zen of CSS Design, I  highly recommend it. Really cool stuff.  There 
>>> is a link to the book  on the Docs & Books page on  ofbiz.apache.org.
>>> -David
>>> On Jan 12, 2007, at 2:42 PM, Adrian Crum wrote:
>>>
>>>> In the maincss.css file, Just below the comment
>>>>
>>>> /* ===== Product Detail Styles ===== */
>>>>
>>>> are six css classes defined using IDs instead of class names. Is   
>>>> there a reason for that?
>>>>
>>>>
> 
> 

Re: maincss.css question

Posted by Andrew Sykes <an...@sykesdevelopment.com>.
Believe it or not, in the UK (perhaps other places too) there are laws
against setting text in px, well, not quite, but almost...

The DDA (Disability Discrimination Act 1995) was designed to make sure
that those with visual impairment were not excluded from accessing
websites, in much the same way as it is illegal to run retail premises
without disabled access.

You can find out more about this from the RNIB (Royal National Institute
for the Blind) website.... 
http://www.rnib.org.uk/xpedio/groups/public/documents/publicwebsite/public_rnib003556.hcsp
Or, more formally from the Office of Public Sector Information...
http://www.opsi.gov.uk/acts/acts1995/1995050.htm

This is particularly pertinent for OfBiz as any company planning to
adopt the technology would be legally obliged to ensure it did not
disbar visually impaired users.
-- 
Kind Regards
Andrew Sykes <an...@sykesdevelopment.com>
Sykes Development Ltd
http://www.sykesdevelopment.com


Re: maincss.css question

Posted by "David E. Jones" <jo...@hotwaxmedia.com>.
Adrian,

I see, no problem. Yeah, it was a project started and never finished!

You'll probably also notice that there is still some table-based  
formatting on the productdetail page that is a bit evil (well, and  
ugly!) and needs to be converted to a CSS-based layout like much of  
the other stuff was.

-David


On Jan 12, 2007, at 2:56 PM, Adrian Crum wrote:

> David,
>
> Thanks for the reply! I understand completely what the ID attribute  
> is for. I was questioning why it was done differently than the rest  
> of the file.
>
>
> David E. Jones wrote:
>
>> This was part of the experimentation with the Zen CSS Garden way  
>> of  doing CSS. Using id attributes to mark regions and styling  
>> implicitly  is the way we want to go in the future. If you're  
>> planning on working  on CSS stuff and you haven't read through The  
>> Zen of CSS Design, I  highly recommend it. Really cool stuff.  
>> There is a link to the book  on the Docs & Books page on  
>> ofbiz.apache.org.
>> -David
>> On Jan 12, 2007, at 2:42 PM, Adrian Crum wrote:
>>> In the maincss.css file, Just below the comment
>>>
>>> /* ===== Product Detail Styles ===== */
>>>
>>> are six css classes defined using IDs instead of class names. Is   
>>> there a reason for that?
>>>
>>>


Re: maincss.css question

Posted by Adrian Crum <ad...@hlmksw.com>.
David,

Thanks for the reply! I understand completely what the ID attribute is for. I 
was questioning why it was done differently than the rest of the file.


David E. Jones wrote:

> 
> This was part of the experimentation with the Zen CSS Garden way of  
> doing CSS. Using id attributes to mark regions and styling implicitly  
> is the way we want to go in the future. If you're planning on working  
> on CSS stuff and you haven't read through The Zen of CSS Design, I  
> highly recommend it. Really cool stuff. There is a link to the book  on 
> the Docs & Books page on ofbiz.apache.org.
> 
> -David
> 
> 
> On Jan 12, 2007, at 2:42 PM, Adrian Crum wrote:
> 
>> In the maincss.css file, Just below the comment
>>
>> /* ===== Product Detail Styles ===== */
>>
>> are six css classes defined using IDs instead of class names. Is  
>> there a reason for that?
>>
>>
> 

Re: maincss.css question

Posted by "David E. Jones" <jo...@undersunconsulting.com>.
This was part of the experimentation with the Zen CSS Garden way of  
doing CSS. Using id attributes to mark regions and styling implicitly  
is the way we want to go in the future. If you're planning on working  
on CSS stuff and you haven't read through The Zen of CSS Design, I  
highly recommend it. Really cool stuff. There is a link to the book  
on the Docs & Books page on ofbiz.apache.org.

-David


On Jan 12, 2007, at 2:42 PM, Adrian Crum wrote:

> In the maincss.css file, Just below the comment
>
> /* ===== Product Detail Styles ===== */
>
> are six css classes defined using IDs instead of class names. Is  
> there a reason for that?
>
>


REMOVE ME PLEASE

Posted by MadTechie <Ma...@yahoo.co.uk>.
REMOVE ME FROM THIS LIST PLEASE!!!!!


		
___________________________________________________________ 
Try the all-new Yahoo! Mail. "The New Version is radically easier to use" � The Wall Street Journal 
http://uk.docs.yahoo.com/nowyoucan.html