Thread: [Phphtmllib-devel] more changes
Status: Beta
Brought to you by:
hemna
From: Walter A. B. I. <wb...@qu...> - 2002-06-07 19:16:17
|
Howdy, I'm working on adding lots more html_* helper functions with various "standard" params for each specific tag to be built. One of the changes I am making to html_td() is to add specific commonly used params. Currently html_td() only accepts content. This kinda sux. So I have come up with html_td($class, $align, $width), params 4 through n are content. I thought about adding colspan as the 4th param, but in my experience, its not used as often as the other 3. Also, according to the w3c spec width is depricated. You should use a style="width:100px" to set the width of the td...but, how many ppl know to do that? My guess is not many. So this leads me to a gray area between the w3c, which I would like to conform to, and normal implementation of html. Browsers still to this day are not very compliant in their implementation of the spec, so its hard to try and enforce an api to the libs that require conformance. So, for the time being I'm trying to take each tag as a case by case basis for conformance vs. implementation. Hence my addition of the width param to html_td(). Also, note, this change to html_td() will break 1.1.x of the libs. folks will have to change their use of html_td(). Thoughts? Walt |
From: Tim M. <mo...@mr...> - 2002-06-07 20:57:13
|
Walter A. Boring IV wrote: > Howdy, > I'm working on adding lots more html_* helper functions with various > "standard" params for each specific tag to be built. One of the changes > I am making to html_td() is to add specific commonly used params. > Currently html_td() only accepts content. This kinda sux. > So I have come up with > html_td($class, $align, $width), > params 4 through n are content. > > I thought about adding colspan as the 4th param, but in my experience, > its not used as often as the other 3. I would like to see the colspan parameter, personally. > Also, according to the w3c spec > width is depricated. You should use a style="width:100px" to set the > width of the td...but, how many ppl know to do that? My guess is not > many. So this leads me to a gray area between the w3c, which I would > like to conform to, and normal implementation of html. Browsers still > to this day are not very compliant in their implementation of the spec, > so its hard to try and enforce an api to the libs that require > conformance. Do most broswers support width in the <style> tag? If so, I'd go with the w3c and not have the width parameter. I've learned to use more <style> tags since you flag the other deprecated items I used to use (<center>, <font>, etc.). > So, for the time being I'm trying to take each tag as a case by case > basis for conformance vs. implementation. Hence my addition of the > width param to html_td(). > > Also, note, this change to html_td() will break 1.1.x of the libs. > folks will have to change their use of html_td(). As I said before, if your going to change the API, now's the time. Just make sure that any API changes are well documented in the Changlog/Readme file. -- Tim Moloney ManTech Real-time Systems Laboratory 2015 Cattlemen Road \ / Sarasota, FL 34232 .________\(O)/________. (941) 377-6775 x208 ' ' O(.)O ' ' |
From: Walter A. B. I. <wab...@bu...> - 2002-06-10 03:00:40
|
On Fri, 2002-06-07 at 13:56, Tim Moloney wrote: > Walter A. Boring IV wrote: > > > Howdy, > > I'm working on adding lots more html_* helper functions with various > > "standard" params for each specific tag to be built. One of the changes > > I am making to html_td() is to add specific commonly used params. > > Currently html_td() only accepts content. This kinda sux. > > So I have come up with > > html_td($class, $align, $width), > > params 4 through n are content. > > > > I thought about adding colspan as the 4th param, but in my experience, > > its not used as often as the other 3. > > I would like to see the colspan parameter, personally. ---ok I dropped the width parameter. I think folks should use the style attribute of the tag, since the W3C says the width attribute for a TDtag is depricated. This doesn't mean u can't do it, its just not a default param for the wrapper function html_td(). If you have to do width="50", then u still can after you have created the object. How often do folks really use colspan on a td? what % of all TDtags that you create need colspan attribute? In my case its less then 10% of all the TDtags I create manually. > As I said before, if your going to change the API, now's the time. > Just make sure that any API changes are well documented in the > Changlog/Readme file. -- I have updated the Changelog to reflect the major/minor changes that have happened since 1.1.0. With any luck I'll have cvs access to the libs this comming week via sourceforge. I am pretty sure that I have all the missing html_* helper functions added. Some of them have special attributes for the most commonly used features of the tags. Take html_fieldset() for example. the first param of that function accepts, text, or a LEGENDtag object. Since the first tag of a <fieldset> tag can be a <legend> tag. If you guys haven't used <fieldset><legend>foo</legend></fieldset> before, its really kewl. Give it a try. Unfortunatly IE 5.5 doesn't render a background color on the legend properly, but it does look killer in Moz. Walt |
From: Tim M. <mo...@mr...> - 2002-06-11 03:37:34
|
Walter A. Boring IV wrote: > How often do folks really use colspan on a td? what % of all TDtags > that you create need colspan attribute? In my case its less then 10% of > all the TDtags I create manually. grep'ing through my code shows about 14% of my TDs use colspan. Not nearly an much as I thought. -- Tim Moloney ManTech Real-time Systems Laboratory 2015 Cattlemen Road \ / Sarasota, FL 34232 .________\(O)/________. (941) 377-6775 x208 ' ' O(.)O ' ' |
From: Walter A. B. I. <wab...@bu...> - 2002-06-11 05:21:20
|
On Mon, 2002-06-10 at 20:36, Tim Moloney wrote: > Walter A. Boring IV wrote: > > > How often do folks really use colspan on a td? what % of all TDtags > > that you create need colspan attribute? In my case its less then 10% of > > all the TDtags I create manually. > > grep'ing through my code shows about 14% of my TDs use colspan. > Not nearly an much as I thought. > ---thats pretty much my % usage of colspan on TD's as well. If nothing else one could always write a local lib wrapper for a tdtag w/ colspan. I am thinking that the API's should reflect as much of the W3C spec as possible. I've started to switch to using style="width:100px" instead of width="100" on my td tags. It seems to work well in both IE and moz/ns Now that mozilla 1.0 is out, I have personally dropped the idea of coding for Netscape 4.x as the minimum. This really opens a whole new world of css and style usage. I've been playing around with a lot of css features recently, and Mozilla seems to have a much better/closer implementation of the standard then IE does. Walt |