Re: Problem with 'target-new' property and alternative suggestion

Daniël Pelsmaeker wrote:

>Anne van Kesteren wrote:
>  
>
>>>>I guess you mean 'target-new' (and releated properties) can only be
>>>>used when the element matches the ':link' or ':visited'
>>>>pseudo-class? (Like AREA, LINK and A do in HTML 4.01.)
>>>>        
>>>>
>>>Indeed. But the ':link' and ':visited' pseudo-classes are intended
>>>for styling, and they are not link-specific. 'target-new' is not for
>>>styling, and actually is link specific. I think it will mostly be
>>>used in the style attributes of elements, instead of in stylesheets.
>>>Therefore, I would not add the 'target-...' properties to CSS, but to
>>>the XML technologies and elements on which these properties are most
>>>meaningful (A, LINK, etc...).
>>>      
>>>
>>How are ':link' and ':visited' not link specific?
>>    
>>
>
>I can use 'a, :link { color: Black; }' and all my links get black. There
>might be reasons why I would want a specific link element or set of links to
>be different, but that's where selectors are for. Generally, a style rule
>specifies the layout of the selected element for the whole document, webpage
>or website. All the same. That's the basic idea behind stylesheets, right?
>Just to get rid of the repetitive work of '<font size="12" ...',
>'color="#000000"' attributes on elements. But 'target-new' is a property
>which would almost never be used for all links on a document, webpage or
>website, or is it?
>
>Anne van Kesteren also wrote:
>  
>
>>So you think a |target="_tab"| (and others) should be added to HTML?
>>(Hixie! ;-))
>>    
>>
>
>Maybe not target="_tab" (annoying underscore!) but indeed, I think that such
>attributes would be more valuable to HTML than to CSS.
>
>Most CSS properties are meant to replace existing HTML attributes, such as
>'color' and 'border', and the 'FONT' element. A website MUST still work
>correctly without stylesheets (disabled, not supported, CSS3 not supported,
>text browser, speech synthesizer) and when I replace the 'target' attribute
>by the CSS' 'target-new', then non-CSS(3) browsing will make my site work
>incorrectly (e.g. the 'open in new window' next to my external links will
>not work!). I'd have to use BOTH! :(
>
>Moving the link behaviour to a stylesheet doesn't make a webpage more
>semantically correct, or does it?
>
>  
>

I must point out in your argument you say "it will break my page" which 
is _never_ true with this property, where this wont cause stuff not to 
be rendered, this wont cause the "page" to be mistaken, this wont cause 
people with no support to NOT be able to use your website.

You site text only browsers in your list, (and aural cannot be far 
behind) , yet you say "where I mark "open in new window" links next to 
all my real ones"  well it can be concluded that by doing so you are 
assuming your users are utter idiots, and if they _wanted_ a new window, 
they would do so, if they do not, they would not, (in most cases), 
though many users do succumb to what the web-designer has written as 
"default" due to the complexities of changing such a means...

Though in auraly used web-pages, "Open in new window" will have _no_ 
meaning to those using an aural browser, which makes it broken from the 
start!

even text-only browsers may not have any ability with "new window"...  
the point is you can do the following in your page:

* { ... }  
to specify what you want as your default "link location", which would 
over-ride the user's stylesheet if they did not do an !important; in it 
(entirely possible)...though you can override it yourself, by adding 
classes, etc. for links you want external, even provide one wrapping div 
for a links page, where its all external, etc....   you loose nothing 
with this, but gain alot, especially in comparason with the other 
mechanics available.

I do agree the other mechanics wont be lost anytime soon, especially as 
long as IE remains a conglomorate in UA terms, since those who write for 
any "non-intranet" page will need to support that.  As well as this is 
not a replacement for the complexities of window.open in many of that 
script technologies usages, but the most common case, "opening a link in 
a new window" is now possible on a portable and user-friendly method, 
and using CSS symantics, this would over-ride target="_blank"  if both 
are applied to the same element...

~Justin Wood

Received on Tuesday, 14 September 2004 01:04:38 UTC