W3C home > Mailing lists > Public > www-style@w3.org > September 2004

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

From: DaniŽl Pelsmaeker <daniel.pelsmaeker@zonnet.nl>
Date: Mon, 13 Sep 2004 21:37:23 +0200
Message-ID: <20040913193750.6973.qmail@postbode01.zonnet.nl>
To: <www-style@w3.org>
Cc: "'Justin Wood \(Callek\)'" <116057@bacon.qcc.mass.edu>

Justin Wood (Callek) wrote:
> DaniŽl Pelsmaeker wrote:
> > Not all websites have friendly uses for these (target-...) rules.
> Well the solution with CSS is much more "fair" than the scripting one,
> where window.open is widely used, even in onclick and similar.

This unfair window.open will still stay, at least for the next few mayor UA
versions. The CSS property will not replace this scripting. It is only used
when a link is followed, just like target="_blank".

Justin Wood (Callek) also wrote:
> The "work-arounds" in place, and their in-ability to be "over-ridden
> easily" is the core problem with NOT doing it in CSS, and is the core
> reason why the CSS solution is easier, if we want a "sidebar" solution,
> just do (for instance mozilla extension)  |{ target-new: -moz-sidebar;
> }|  why overdefine what can be and is semantically possible, and make
> work harder for the USER (and UA developers) to create and maintain a
> 'working' system, with stylistic behaviors.

The new CSS property target-new doesn't add anything. The website creator
only gets more options on how and where the result is displayed, but
currently I can achieve getting my webpage in a new window just by using
target="_blank" instead of { target: window; }.
When it comes to using target-new in combination with the other target-...
properties, I can see that it adds functionality in regard to where a window
is positioned, what size it is, and which UI elements (address bar,
titlebar, scrollbars) are displayed in the window. But still I really think
that this is a XHTML issue rather than a CSS issue. It is behaviour, not
style, and it can be very specific for a single link.

The implementation of this behaviour is determined by the user-agent, and I
don't see why a UA would have less control on an element's attribute than on
a CSS property using a user stylesheet. In fact, using a user stylesheet to
override and control the behaviour of the target-new property limits this to
the possibilities of the target-new CSS property. For example:

Bill Talcott wrote:
> The browser could then handle "external" links in whatever way the user 
> specifies - same window, new tab, new window, etc. A clever browser could 
> even be configured to handle an external link in the same domain 
> differently (in a new tab, instead of a new window, for example).

This isn’t possible using just a stylesheet to override another stylesheet.
You'd have to implement different stylesheet rules used by the UA based on
decisions of the UA to achieve this. Or just let the UA handle the window
creation when a link is clicked, based on the attributes of the element A.

Then, I've never used a stylesheet to override anything in the webpages that
I view. I'd like to keep it that way, keeping me from writing a stylesheet
just to prevent annoying new windows popping up every time I click a link on
a website whose stylesheet specifies that that's the way to go. I know, now
you can also get all links to open in new windows using target="_blank" on
each link, but that isn't nearly as easy as writing:
a { target-new: window; }

By the way, isn't target-new very element specific? It is really only used
for A elements, for (X)HTML pages, while almost all other (CSS2) properties
apply to any element, even on XML pages.
Received on Monday, 13 September 2004 19:38:24 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:15 UTC