RE: [WSG] Standard Hacks?

2004-06-09 Thread Kay Smoljak
 Would it be beneficial to come up with a list of Standard Hacks :-)

I think the idea is that you should stay away from hacks as much as
possible. One exception is the box model hack for IE5 and IE5.5 - but there
are a couple of different ways of doing that one, and which one you pick
depends on the particular problem you are having.

We generally don't resort to hacks unless not having them would cause
serious issues with the design. Even then, if it's possible to alter the
design to make it more standards friendly without detracting from the
look, then we try to do that. I think a lot of people (graphic designers
especially) overestimate the amount of attention that clients pay to detail
- they generally only look at the site in one browser anyway, so pixel
perfection across platforms is not usually necessary. I don't remember the
last time a Photoshop mockup looked exactly like the finished site...

--
Kay Smoljak
Senior Developer/QC Leader/Search Optimisation
PerthWeb Pty Ltd - http://www.perthweb.com.au/
Ph: 08 9226 1366 - Fax: 08 9226 1375 


*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
* 



Re: [WSG] Standard Hacks?

2004-06-09 Thread Chris Stratford




John,

It is always best to avoid any sort of hack.
There is always a way around a hack, if that be by adding an extra div.
or changing your menu layout.

Hacks are *last resort* methods to create a layout.

I think a list of _standard hacks_ would just promote the use of hacks,
where they are not needed.
That list would become abused - well thats a guess - by newbies to
XHTML and CSS...
and it would lead to the same issues we have now - with inaccessability
and validation.

my 2 cents,

chris stratford


J4Web wrote:
Hello
  
  
I have been reading this list for a few weeks and am finding it very
valuable. I think this is my first post.
  
  
  
  
I am at the stage of teaching myself CSS-P and unravelling the whole
issue of standards and accessibility.
  
  
I am of course aware that there are all sorts of hacks available to
massage standards compliant code for non-compliant browsers.
  
  
The question I have been asking myself, and now ask you guys, is:
  
  
  
  
Would it be beneficial to come up with a list of "Standard Hacks" :-)
  
  
  
  
I mean by this a list of hacks that could be incorporated into standard
CSS templates for beginning new sites, that would save the bother of
hacking the most prevalent problems one by one as they arise.
  
  
Perhaps such a list - or even such a template - exists already?
  
  
Thanks
  
  
John Saward
  
  
  
*
  
The discussion list for http://webstandardsgroup.org/
  
See http://webstandardsgroup.org/mail/guidelines.cfm
  
for some hints on posting to the list  getting help
  
* 
  
  
  






RE: [WSG] Standard Hacks?

2004-06-09 Thread Chris Blown
That is true, however already knowing of such hacks enables you to make
this kind of judgement. So for the purpose of education these should
help you out John 

http://diveintomark.org/safari/csshacks/

http://css-discuss.incutio.com/?page=CssHack

Enjoy or not ;)  

On Wed, 2004-06-09 at 18:15, Kay Smoljak wrote:
  Would it be beneficial to come up with a list of Standard Hacks :-)
 
 I think the idea is that you should stay away from hacks as much as
 possible. One exception is the box model hack for IE5 and IE5.5 - but there
 are a couple of different ways of doing that one, and which one you pick
 depends on the particular problem you are having.
 


*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
* 



Re: [WSG] Standard Hacks?

2004-06-09 Thread Mark Stanton
I agree with Kay, avoid them when possible, Certainly don't take the
approach of including a bunch of them in every CSS regardless of
whether you need them or not.

If you are after more specific information on hacks (or filters as
they are also known), check out
http://www.google.com/search?q=css+hacks


Cheers

Mark
-- 
Mark Stanton 
Technical Director 
Gruden Pty Ltd 
Tel: +61 2 9299 9462 
Fax: +61 2 9299 9463 
Mob: +61 410 458 201 
http://www.gruden.com 
mailto:[EMAIL PROTECTED]
*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
* 



Re: [WSG] Standard Hacks?

2004-06-09 Thread Nick Lo
I think that's a great idea actually. In theory yes we should all avoid 
hacks but there are a few reasons where a big fat list of the 
standard hacks, reasons for use and pros and cons would be useful...

1. If a deadline is looming and a hack will temporarily get you through 
it without resorting to the old demons of HTML.
2. To help understand the source/css of sites that have used a hack to 
implement something.
3. To get an idea of the kind of bugs/issues that have required a hack 
to get over.

Nick
Would it be beneficial to come up with a list of Standard Hacks :-)
*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
* 



Re: [WSG] Standard Hacks?

2004-06-09 Thread Rick Faaberg
 I think that's a great idea actually. In theory yes we should all avoid
 hacks but there are a few reasons where a big fat list of the
 standard hacks, reasons for use and pros and cons would be useful...
 
 1. If a deadline is looming and a hack will temporarily get you through
 it without resorting to the old demons of HTML.
 2. To help understand the source/css of sites that have used a hack to
 implement something.
 3. To get an idea of the kind of bugs/issues that have required a hack
 to get over.
 
 Nick
 
 Would it be beneficial to come up with a list of Standard Hacks :-)

This makes perfect sense to me especially if it were a wikipedia or similar
type of site that members would update and comment and keep current.

Rick Faaberg

*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
* 



Re: [WSG] Standard Hacks?

2004-06-09 Thread Mordechai Peller
Chris Stratford wrote:
It is always best to avoid any sort of hack.
It's important to remember why hacks exist in the first place. More 
often than not, it's because a browser either doesn't support a feature 
of CSS, or worse, supports it incorrectly.

There is always a way around a hack, if that be by adding an extra div.
Adding an extra div is hacking the mark-up, which I think is much worse.
Hacks are *last resort* methods to create a layout.
Depends on the hack. For example, hiding style rules from NN4 with 
@-rules is almost alway better than changing your layout.

I think a list of _standard hacks_ would just promote the use of 
hacks, where they are not needed.
If you include comments about when and why to use it and not to use it 
the problem should be kept to a minimum.
*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
* 



Re: [WSG] Standard Hacks?

2004-06-09 Thread Mark Harwood
media=screen is not a hack, thats statin the proper display device target for
the relavent stylesheet.

Hacks are things like the IE Underscore hack, they tend to be workarounds for CSS
properties that are not yet implemented in certain browsers or that need slightly
differnt values, theres differnt hacks for each of the dodgy browsers.

But you sould always look towards creating your site hack free as that is the
best was to make sure its backward/forward and bloody even sideways compatible!

Hacks are for the Cowbot webdesigner who hasnt done his job right in the first
place! ( or for a client thats given too much hassle and not enough cash to make
the recode cost effective! ;] )

Mark
www.phunky.co.uk

On Wed, 09 Jun 2004 23:11 , J4Web [EMAIL PROTECTED] sent:

Well; I am surprised, but pleased actually, that so many of you are saying 
that hacks are not part of the Standards Arsenal. I had got the impression 
that I needed to become familiar with gadzillian hacks and be able to draw 
the appropriate one out of the woodwork every ten lines of CSS code. But I 
am getting the message that one can produce Standards Compliant pages 
without hacking.

I am not quite totally convinced, though, and some of the replies have gone 
in the direction of supporting a big fat list, if not including some 
hacks in standard templates.

I wondered if there are some workarounds that people on this list use 
habitually and forget they use them, so I did a quick sample of some of the 
URLs at the bottom of peoples' posts and the only hack I found so far (but 
I have not searched very thoroughly) was on the webstandards.org.au site :

@import 
url(/stylesheets/wsg_advanced.css);

media=screen

Is the import hack a candidate for first (or sole) item on the list of 
standard hacks?

It seems pretty essential to me to get version 4 browsers to degrade 
gracefully.

I am enjoying learning from those who have been in this game much longer 
than me.

John


The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help





*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
* 



Re: [WSG] Standard Hacks?

2004-06-09 Thread Mordechai Peller
J4Web wrote:
style type=text/css media=screen@import 
url(/stylesheets/wsg_advanced.css);/style
link rel=stylesheet href=/stylesheets/wsg_main.css 
type=text/css media=screen

Is the import hack a candidate for first (or sole) item on the list of 
standard hacks?
After giving it some thought, I wouldn't call this a hack. CSS provides 
two ways of accessing external style sheets: @import and link/. Both 
are valid CSS. What the hack does is feed styles which aren't intended 
for NN4 by using a method which NN4 doesn't support. Compare this to 
what most hack do: they use irregular, but technically valid, ways of 
writing rule to take advantage of parsing errors in order to hide rules.

Another example of a not a hack hack might be conditional comments. 
Here too is a case of not parsing rather than unable to parse.

*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
* 



RE: [WSG] Standard Hacks?

2004-06-09 Thread Peter Firminger
Russ and I have discussed this at length and we have come to the opinion
that the @import rule (when used in that manner) is indeed a hack but a
harmless one.

The reasoning is that it exploits a bug or particular behaviour in a
browser. In this case, older browsers don't understand it at all and they
ignore it so that the real styles that will break them can be put in there
safely.

We believe (and maintain) that it is harmless as we can't envisage any
browser manufacturer not obeying it in the future as it is actually the
preferred method.

Regards,

Peter


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Mark Harwood
 Sent: Wednesday, June 09, 2004 11:35 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [WSG] Standard Hacks?

 media=screen is not a hack, thats statin the proper display
 device target for
 the relavent stylesheet.

 Hacks are things like the IE Underscore hack, they tend to be
 workarounds for CSS
 properties that are not yet implemented in certain browsers
 or that need slightly
 differnt values, theres differnt hacks for each of the dodgy browsers.

 But you sould always look towards creating your site hack
 free as that is the
 best was to make sure its backward/forward and bloody even
 sideways compatible!

 Hacks are for the Cowbot webdesigner who hasnt done his job
 right in the first
 place! ( or for a client thats given too much hassle and not
 enough cash to make
 the recode cost effective! ;] )

 Mark
 www.phunky.co.uk

 On Wed, 09 Jun 2004 23:11 , J4Web [EMAIL PROTECTED] sent:

 Well; I am surprised, but pleased actually, that so many of
 you are saying
 that hacks are not part of the Standards Arsenal. I had got
 the impression
 that I needed to become familiar with gadzillian hacks and
 be able to draw
 the appropriate one out of the woodwork every ten lines of
 CSS code. But I
 am getting the message that one can produce Standards
 Compliant pages
 without hacking.
 
 I am not quite totally convinced, though, and some of the
 replies have gone
 in the direction of supporting a big fat list, if not
 including some
 hacks in standard templates.
 
 I wondered if there are some workarounds that people on this
 list use
 habitually and forget they use them, so I did a quick sample
 of some of the
 URLs at the bottom of peoples' posts and the only hack I
 found so far (but
 I have not searched very thoroughly) was on the
 webstandards.org.au site :
 
 @import
 url(/stylesheets/wsg_advanced.css);
 
 media=screen
 
 Is the import hack a candidate for first (or sole) item on
 the list of
 standard hacks?
 
 It seems pretty essential to me to get version 4 browsers to degrade
 gracefully.
 
 I am enjoying learning from those who have been in this game
 much longer
 than me.
 
 John
 
 
 The discussion list for http://webstandardsgroup.org/
 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
 




 *
 The discussion list for http://webstandardsgroup.org/
 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
 *



*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
* 



Re: [WSG] Standard Hacks?

2004-06-09 Thread russ - maxdesign
 Is the import hack a candidate for first (or sole) item on the list of
 standard hacks?
 It seems pretty essential to me to get version 4 browsers to degrade
 gracefully.

CSS hacks are one of those questions (like font sizes) that bring out the
fanatics from all sides. On one side you will have people who are completely
opposed to hacks. At the other end of the spectrum are people who use hacks
scattered throughout their CSS.

A lot of this stems from a difference between theory and reality.
Theoretically it is bad to use any hacks. In reality, you or your client may
need to get a layout to behave in a particular manor that cannot be achieved
without some form of hack. Sometimes you can work around these issues
without hacks, sometimes you can persuade clients that layout differences
are not important, but other times there may be no alternative - this is a
commercial reality.

Basically, hacks come down to
- personal choice
- the amount of knowledge you have of workarounds
- the specific design you are trying to achieve

If you design your own layouts, you can often avoid hacks simply because you
can be keeping the main browser issues in mind when designing (not so easy
if you are implementing someone else's design). For this reason it is vital
that you read up on all the major browser bugs - so you can head them off at
the pass. The best place to go for the main IE bugs is here:
http://positioniseverything.net/

The @import hack is one solid method of hiding content from older browsers -
even though that it is not its intended purpose - which is why it is
classified as a hack. For more on this go here:
http://www.mail-archive.com/wsg%40webstandardsgroup.org/msg00841.html

To see a tutorial that explains how to use the @import hack go here:
http://www.maxdesign.com.au/presentation/process/

The particular step in the tutorial dealing with older browsers is:
http://www.maxdesign.com.au/presentation/process/index_step10.cfm

Which hacks would I use? I generally try to avoid any hacks apart from the
@import hack, but will sometimes use the display: inline fix to avoid
double margins on floats. I don't think I have ever used a box model hack.

Work around where possible, hack sparingly, shower regularly.  :)

2 cents
Russ

*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
* 



Re: [WSG] Standard Hacks?

2004-06-09 Thread t94xr.net.nz webmaster
 Hacks are for the Cowbot webdesigner who hasnt done his job right in the
first
 place! ( or for a client thats given too much hassle and not enough cash
to make
 the recode cost effective! ;] )

quite true - but there are hacks that are used to counteract behavours in
browsers.

Camz
www.t94xr.net.nz


*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
* 



Re: [WSG] Standard Hacks?

2004-06-09 Thread Rimantas Liubertas
-- Original Message -
From: scott parsons [EMAIL PROTECTED]

I do not know what industry you work in but in every industry I have 
worked in there is a great need for pixel precise layouts.

Can you name some industries?


...
Clients and the many print trained art directors want pixel precision... 
...

Why not to export entire page from photoshop as GIF, JPEG, or PNG and put
it on the website? That's the only way I know to get pixel percision.
How do you and your clients imagine pixel precision in screen readers, mobile phones
and PDAs? 
How do they know is this layout pixel presice or not?
For me talks about pixel prescion is an indicator that nobody really cares what and 
whom this website is for.

Regards,
Rimantas
*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
* 



RE: [WSG] Standard Hacks?

2004-06-09 Thread Patrick Lauke
 I do not know what industry you work in but in every industry I have 
 worked in there is a great need for pixel precise layouts.
 
 When you go through 13 rounds of changes with a client and discuss 
 things like the letter spacing on single superscript letters then you 
 just might have to put in the odd hack.

Or it might be time to educate your client with regards to the web is not
print. What's next: discussions about exact colour matching, across all
browsers?
 
 Browsers render differently, and while we might all like to say that 
 hacks are bad and not needed I think that is a disservice to 
 people just 
 learning to use CSS-p for layouts.

In terms of taming browser bugs when it comes to layouts, yes...hacks
(clean CSS based workarounds, not ugly abuses of markup) are still
required...although it's nicer if one can get away with not having to
use them by reorganising the html (but I know, this is not always easy).

 When I was learning css part of learning all the browser quirks was 
 learning how to get around them, but you cannot learn all 
 that at once 
 and sometimes you need to focus on learning part A properly 
 before you 
 move on to part B.

Very true. I find that the best thing is to first concentrate on the
standards-compliant, clean, ideal way of doing things (previewing
the work in standards-compliant browsers), just to get the idea of the
bigger picture of how things can and should be done. Only later should
one tackle the special cases in which hacks are required. So, going from
the general (the way it should be) to the specific (the few hacks you need
to achieve the ideal way).

 Clients and the many print trained art directors want pixel 
 precision... 

Again, part of the solution is educating the client. Heck, I've just had
a long winded discussion with a company sub-contracting me to do a bit
of web work, who kept saying the pages need to all fit within the browser
window...scrolling is bad.

Patrick

Patrick H. Lauke
Webmaster / University of Salford
http://www.salford.ac.uk
*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
*



RE: [WSG] Standard Hacks?

2004-06-09 Thread Rimantas Liubertas
-- Original Message -
From: Peter Firminger [EMAIL PROTECTED]

Russ and I have discussed this at length and we have come to the opinion
that the @import rule (when used in that manner) is indeed a hack but a
harmless one.

The reasoning is that it exploits a bug or particular behaviour in a
browser. In this case, older browsers don't understand it at all and they
ignore it so that the real styles that will break them can be put in there
safely.
...


So it is a bug. Not a hack. Imagine an webdesigner who never saw NN4.x nor he 
cared to much about it's bugs. He uses perfectly valid @import rule.
And all of sudden you claim him using hacks. Why?

Then you use something not for that it's been intended - it is a hack. Now it's just a 
bug/not implemented feature.

Regards,
Rimantas

*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
* 



RE: [WSG] Standard Hacks?

2004-06-09 Thread Peter Firminger
No, we do it to specifically exploit this bug or particular behaviour so it
is a hack. If you look at the stylesheets you'll see that there is basic css
in the one that NN4 can see and all the other more advanced stuff is in the
one it can't see. All quite deliberate using both methods to achieve it.

 So it is a bug. Not a hack. Imagine an webdesigner who never
 saw NN4.x nor he
 cared to much about it's bugs. He uses perfectly valid @import rule.
 And all of sudden you claim him using hacks. Why?

Ignorance of the law is no excuse :-) and he (or she) would get an unstyled
page in NN4, doesn't bother me a bit as long as it is semantically correct
as well. I would say this person was hacking at all. It's the use of BOTH
methods to target NN4 that is a hack.

Regards,

Peter


*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
* 



Re: [WSG] Standard Hacks?

2004-06-09 Thread Nick Lo

I just think it is a little simplistic and idealistic to tell 
newcomers to css that all hacks are bad.
Good post Scott...It's a relief seeing real world scenarios used to 
backup reasons and choices. I'm often surprised at the number of 
educate your clients to understand why they cannot have their design 
looking the way they want it when the other design company down the 
road CAN do it (even though their source is frightening!) etc... type 
arguments raised. I don't now about everyone else but I already spent 
huge amounts of time educating clients about everything from content 
classification to signatures in emails to what a web browser is. When I 
get them to follow the need for standards then that in itself is a good 
enough step for me.

Honestly how many clients have the time to be constantly educated on 
the ins and outs of web site development? As I see it for most clients 
before the web there was print (mmm still is...but get the idea) and 
how often did they need to learn about the ins and outs of how their 
brochure was put together and why this may not line up exactly with 
that, etc...

Anyway, to re-emphasise John's question:
Would it be beneficial to come up with a list of Standard Hacks :-)
He merely asked if a list of standard/stroke common hacks would be 
useful, not whether hacks are good/bad or should/shouldn't be used. 
Personally, I'd say it would be useful for the reason I cited in an 
earlier post and whether you use them or not is dependant on your real 
world situation.

Nick
*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
*