Re: [WSG] Branding - Accessible, Unobtrusive and Semantic

2006-08-13 Thread Navjot Pawera




Reason the code is not working in Opera - 
the code uses document.all to detect the browser (assuming IE from FF
in this case) and then create elements using setAttribute(class) - for
FF or setAttribute(className) - for IR
But since document.all is used by Opera as well, Opera is given code
with setAttribute(className) - which Opera
doesn't support

Hence, to properly detect IE and give it exclusive code, the use of an
IE only property works here, like -
document.styleSheets[0].owningElement
Thus, changing the code at line 45 to:

 classVar = (document.styleSheets[0].owningElement) ? 'className' :
'class' ;

should make things work.

- Navjot

David Laakso wrote:
Richard
Czeiger wrote:
  
  Hi all :o)



Just thought I'd throw a bit of code out there and see if anyone thinks
it's useful..



Unobtrusive Semantic Branding

http://www.grafx.com.au/dik/branding.html



Basically it allows you to dynamically style a company's brand name
every time it appears on a web page as text.

All you have to do it wrap it in a span with a class name (I've
used "brand") and away we go :o)



You can style your branded company name any way you like and it works
on all elements, including those with existing (multiple) class names.



Check it out and if you find any bugs, please let me know.

Cheers :o)



Richard


  
Maybe it is a setting on my end? Not working for me:
  
Opera
  
Version9.01
  
Build8552
  
PlatformWin32
  
SystemWindows XP
  
and I default to fuchsia background-color.
  
Best,
  
~dL
  
  
  
**
  
The discussion list for http://webstandardsgroup.org/
  
  
See http://webstandardsgroup.org/mail/guidelines.cfm
  
for some hints on posting to the list  getting help
  
**
  
  
  


-- 
Navjot Pawera

www.navjotpawera.com
www.opera.com



**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] Branding - Accessible, Unobtrusive and Semantic

2006-08-13 Thread Richard Czeiger



Wow! What a great bunch of people 
we have on this list!

Firstly, Navjot - thanks for that: 
you've cleaned up something I never got round to. 
I keep for getting about Opera... 
sheesh!
Well done :o)

Secondly, Paul, thank you for your 
VERY insightful and intelligent response to Bob's reservations.
I agree with you 100%. Normally, 
this kind of thing IS better served from the back-end.
Indeed the original reason why this 
script was produced was becasue the clietn has web hosting that doesn't support 
server-side languages (yes, incredibly cheap hosting that they're attached 
to).
I've often wondered lately how 
large exactly a site has to be before some back-end serving is 
required.
In Australia, this can sometimes 
mean the difference between paying $100 a year or $300 a year - which is a 
considerable sum for many small businesses.

Thirdly, hi Ben 
:o)
sIFR is certainly a 
goodoption, but there's something about it that for me at least, has a bit 
"I can't be bothered" thing about it.
I really don't like messing about 
with those SWF font files... I was after something quick and clean and, to be 
honest, this felt like more fun to work on... :o)
However, sIFR is absolutely a very 
valid option and I think I'd probably go for this on a larger scale project (or 
at least one I cared a lot more about).

To all though, thanks for your 
EXCELLENT reponses. This is one of the few times I've seen criticism on this 
list aired so professionally and helpfully.
You guys rock 
:o)
Richard

**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] Branding - Accessible, Unobtrusive and Semantic

2006-08-12 Thread Designer

Paul Novitski wrote:

At 11:09 AM 8/11/2006, Designer wrote:

Richard Czeiger wrote:

Hi all  :o)

Just thought I'd throw a bit of code out there and see if anyone 
thinks it's useful..


Unobtrusive Semantic Branding
http://www.grafx.com.au/dik/branding.html

Yes, it's interesting - but is there an advantage over pure CSS?  see 
[1].  It seems simple, but I knocked it up very quickly, so someone 
may find a problem . . .


[1]  http://www.marscovista.fsnet.co.uk/template/branding_CSS.html



Bob, you're presenting the markup that Richard's script produces.  By 
the time his script has finished running, his and your solutions are 
both HTML  CSS.  He's just using javascript to automate the 
distribution of his solution throughout the markup.


Which, of course, is why I missed the reasoning behind the choice of js 
over html in this case, especially since Richard's approach doesn't work 
in Opera (yet).


What does make sense -- and this is the intelligence at the core of 
Richard's script -- is the separation of the brand name from the brand 
styling.  Because his method of branding (applying different colors to 
substrings within the whole) requires specific markup, he's inserting 
his classed spans into vanilla markup instead of hard-coding the whole 
thing in HTML.  This is smart.  It's the decision to perform this 
morph after download that I question.



I missed the subtlety of this (too tired!).  Thanks.

--
Best Regards,

Bob McClelland

Cornwall (UK)
www.gwelanmor-internet.co.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] Branding - Accessible, Unobtrusive and Semantic

2006-08-11 Thread David Laakso

Richard Czeiger wrote:

Hi all  :o)
 
Just thought I'd throw a bit of code out there and see if anyone 
thinks it's useful..
 
Unobtrusive Semantic Branding

http://www.grafx.com.au/dik/branding.html
 
Basically it allows you to dynamically style a company's brand name 
every time it appears on a web page as text.
All you have to do it wrap it in a span with a class name (I've used 
brand) and away we go  :o)
 
You can style your branded company name any way you like and it works 
on all elements, including those with existing (multiple) class names.
 
Check it out and if you find any bugs, please let me know.

Cheers  :o)
 
Richard



Maybe it is a setting on my end? Not working for me:
Opera
Version9.01
Build8552
PlatformWin32
SystemWindows XP
and I default to fuchsia background-color.
Best,
~dL


**
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] Branding - Accessible, Unobtrusive and Semantic

2006-08-11 Thread Joe
That is a nice little chunk of code.  I might find that useful in the near
future!

I salute thee.

Joseph Bernhardt
Web Applications Developer
Incomprehensibilities, Inc.
406.587.4875 - Office
406.570.2004 - Cellular
[EMAIL PROTECTED]

 -Original Message-
 From: listdad@webstandardsgroup.org [mailto:[EMAIL PROTECTED]
 On Behalf Of Richard Czeiger
 Sent: Thursday, August 10, 2006 8:44 PM
 To: wsg@webstandardsgroup.org
 Subject: Re: [WSG] Branding - Accessible, Unobtrusive and Semantic
 
 Thanks to Lindsay's comments, the hover color issues is resolved - it
 requires a background value (even one of inherit).
 
 R  :o)
 
 - Original Message -
 From: Lindsay Evans [EMAIL PROTECTED]
 To: wsg@webstandardsgroup.org
 Sent: Friday, August 11, 2006 12:22 PM
 Subject: Re: [WSG] Branding - Accessible, Unobtrusive and Semantic
 
 
  On 8/11/06, Richard Czeiger [EMAIL PROTECTED] wrote:
  Hi all  :o)
 
  Just thought I'd throw a bit of code out there and see if anyone thinks
  it's
  useful..
 
  Unobtrusive Semantic Branding
  http://www.grafx.com.au/dik/branding.html
 
  Hi Richard,
  Interesting bit of code, I could've used something like this a few
  years ago when we had a client that had part of their company name
  bolded  insisted on it following brand everywhere :)
 
  btw, I got the colours to change on the hover state using this CSS:
 
  a.brand:hover .b1 { color: #f00; }
  a.brand:hover .b2 { color: #0f0; }
  a.brand:hover .b3 { color: #00f; }
  a.brand:hover .b4 { color: #00e; }
  a.brand:hover .b5 { color: #00d; }
  a.brand:hover .b6 { color: #00c; }
  a.brand:hover .b7 { color: #00b; }
  a.brand:hover .b8 { color: #00a; }
 
  Is that what you were intending?
 
  --
  Lindsay Evans
  http://lindsayevans.com/
 
 
  **
  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] Branding - Accessible, Unobtrusive and Semantic

2006-08-11 Thread Joe
 Maybe it is a setting on my end? Not working for me:
 Opera
 Version9.01
 Build8552
 PlatformWin32
 SystemWindows XP
 and I default to fuchsia background-color.
 Best,
 ~dL

It doesn't work on Opera for me, either.  But, it works great in FF! :)

Joseph Bernhardt
Web Applications Developer
Incomprehensibilities, Inc.
406.587.4875 - Office
406.570.2004 - Cellular
[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] Branding - Accessible, Unobtrusive and Semantic

2006-08-11 Thread Designer

Richard Czeiger wrote:

Hi all  :o)
 
Just thought I'd throw a bit of code out there and see if anyone 
thinks it's useful..
 
Unobtrusive Semantic Branding

http://www.grafx.com.au/dik/branding.html
 
Yes, it's interesting - but is there an advantage over pure CSS?  see 
[1].  It seems simple, but I knocked it up very quickly, so someone may 
find a problem . . .


[1]  http://www.marscovista.fsnet.co.uk/template/branding_CSS.html

--
Best Regards,

Bob McClelland

Cornwall (UK)
www.gwelanmor-internet.co.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] Branding - Accessible, Unobtrusive and Semantic

2006-08-11 Thread Ben Lobo

On 8/11/06, Paul Novitski [EMAIL PROTECTED] wrote:


Personally I think javascript is an odd choice for this.
...
Javascript is great for immediate user interaction, but for page
modification like this it seems slow, redundant, and inefficient.  If
we're generating our pages server-side to begin with, why download an
incomplete markup to the client and then complete the markup with
javascript?  It makes sense when javascript executes differently
based on user actions and on conditions found only after download,
but I don't see that here.



I agree that, if possible, this type of thing is probably better done
on the server side. But regardless of whether it's done server or
client side, I think branding can be quite difficult to solve with CSS
 HTML alone, mainly because the required fonts often aren't
available.

Perhaps sIFR (Scalable Inman Flash Replacement) would be a viable
alternative (http://wiki.novemberborn.net/sifr/)?

Ben Lobo
Hobo Internet, 39-40 Bond St, Brighton  Hove, East Sussex, BN1 1RD, UK
http://www.hobointernet.com


**
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] Branding - Accessible, Unobtrusive and Semantic

2006-08-10 Thread Lindsay Evans

On 8/11/06, Richard Czeiger [EMAIL PROTECTED] wrote:

Hi all  :o)

Just thought I'd throw a bit of code out there and see if anyone thinks it's
useful..

Unobtrusive Semantic Branding
http://www.grafx.com.au/dik/branding.html


Hi Richard,
Interesting bit of code, I could've used something like this a few
years ago when we had a client that had part of their company name
bolded  insisted on it following brand everywhere :)

btw, I got the colours to change on the hover state using this CSS:

a.brand:hover .b1 { color: #f00; }
a.brand:hover .b2 { color: #0f0; }
a.brand:hover .b3 { color: #00f; }
a.brand:hover .b4 { color: #00e; }
a.brand:hover .b5 { color: #00d; }
a.brand:hover .b6 { color: #00c; }
a.brand:hover .b7 { color: #00b; }
a.brand:hover .b8 { color: #00a; }

Is that what you were intending?

--
Lindsay Evans
http://lindsayevans.com/


**
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] Branding - Accessible, Unobtrusive and Semantic

2006-08-10 Thread Richard Czeiger
Thanks to Lindsay's comments, the hover color issues is resolved - it 
requires a background value (even one of inherit).


R  :o)

- Original Message - 
From: Lindsay Evans [EMAIL PROTECTED]

To: wsg@webstandardsgroup.org
Sent: Friday, August 11, 2006 12:22 PM
Subject: Re: [WSG] Branding - Accessible, Unobtrusive and Semantic



On 8/11/06, Richard Czeiger [EMAIL PROTECTED] wrote:

Hi all  :o)

Just thought I'd throw a bit of code out there and see if anyone thinks 
it's

useful..

Unobtrusive Semantic Branding
http://www.grafx.com.au/dik/branding.html


Hi Richard,
Interesting bit of code, I could've used something like this a few
years ago when we had a client that had part of their company name
bolded  insisted on it following brand everywhere :)

btw, I got the colours to change on the hover state using this CSS:

a.brand:hover .b1 { color: #f00; }
a.brand:hover .b2 { color: #0f0; }
a.brand:hover .b3 { color: #00f; }
a.brand:hover .b4 { color: #00e; }
a.brand:hover .b5 { color: #00d; }
a.brand:hover .b6 { color: #00c; }
a.brand:hover .b7 { color: #00b; }
a.brand:hover .b8 { color: #00a; }

Is that what you were intending?

--
Lindsay Evans
http://lindsayevans.com/


**
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
**