Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Kudos to Wired News!

0 views
Skip to first unread message

Whappo

unread,
Oct 12, 2002, 2:16:16 AM10/12/02
to
Don't know if any of you visit Wired News but their new
page design, using XHTML and CSS, is very slick.
Good job Wired.

http://www.wired.com/news/culture/0,1284,55675,00.html


Christian Wagner

unread,
Oct 12, 2002, 2:59:08 AM10/12/02
to

"Whappo" <Wha...@operamail.com> wrote in message
news:1103_10...@news.opera.no...


Thus proving that standards-compliant, CSS-based websites can
-still- look like shit. God, that color scheme makes me want
to kill someone (possibly myself).

--
Christian Wagner
Sysadmin, Writer, Geek
cwa...@io.com
http://www.balseraph.net

Henk

unread,
Oct 12, 2002, 5:27:56 AM10/12/02
to
"Christian Wagner" <cwa...@io.com> wrote about the new Wired design:

> Thus proving that standards-compliant, CSS-based websites can
> -still- look like shit. God, that color scheme makes me want
> to kill someone (possibly myself).

They said (if I understood them right, on their "aren't-we-great-now" page)
that they intend to introduce a different color scheme for each day in the
week.

So maybe you'll have to kill yourself only once a week, then...

But I agree with you that in some situations, it would be very nice if
Opera had a Black-White button ;-) More seriously, a special style sheet
for things like this might do the same, more or less.

I would actually like it if Opera would allow some quick button toggles to
instantly apply a few extra stylesheets - not just the one default user
stylesheet.

Henk

R.A.G. Seely

unread,
Oct 12, 2002, 12:25:29 PM10/12/02
to
Henk <vse...@COMMENTxs4all.nl> wrote in
news:Xns92A574BCE7102...@193.69.113.75:

But Opera *does* have such a button - in my case it's located right beside
the graphics toggle button - to switch to your own preferred style. Make
that one of the several plain vanilla styles available, and bingo - gone
are "cool" colour schemes. It makes browsing a much pleasanter experience.

-= rags =-

--
To reply by email, use "@" not "__A@T__"
<rags AT math . mcgill . ca>
<http://www.math.mcgill.ca/rags>

Entia non sunt multiplicanda praeter necessitatem.

Mark V

unread,
Oct 12, 2002, 4:09:08 PM10/12/02
to
Whappo <Wha...@operamail.com> wrote in news:1103_1034403376
@news.opera.no:

Do the "Text size" selections work for anyone?
(I know we have scaling inside Opera)

Henk

unread,
Oct 12, 2002, 4:25:03 PM10/12/02
to
"R.A.G. Seely" <rags__A@T__math.mcgill.ca.invalid> wrote:
(about stylesheet toggling)

> But Opera *does* have such a button - in my case it's located right
> beside the graphics toggle button - to switch to your own preferred
> style. Make that one of the several plain vanilla styles available,
> and bingo - gone are "cool" colour schemes. It makes browsing a much
> pleasanter experience.

Yes, thanks for your willingness to help! I agree, and I guess I should
have made myself more clear. What you mean is the button that toggles
between "author mode" (the page's own stylesheet) and "user mode" (the
user-defined stuylesheet). I use this a lot, too, and frankly wouldn't even
consider a browser without this toggle. It's great.

But what I meant was some button (or a series of buttons, or a dropdown
list) that would allow you to quickly activate a specific one out of
*several* user-defined stylesheets. For example, depending from what
stylesheets you would make to take care of specific problems, such a select
button would allow you to very quickly activate "black-on-white" or
"yellow-on-blue" or "left-align all elements" or "render all text in 12-
point size" or "keep a wide right margin" etc., just as some specific pages
might require.

BTW, would you care to translate the Latin for me?

Best regards, Henk

Tim Rivera

unread,
Oct 12, 2002, 4:24:04 PM10/12/02
to
> Do the "Text size" selections work for anyone?
> (I know we have scaling inside Opera)

Works in Mozilla, I assume NN6+ also. What it does is change to an alternate
style sheet.


Tim


Henk

unread,
Oct 12, 2002, 5:08:18 PM10/12/02
to
Mark V <inv...@notvalid.net> wrote:

> Do the "Text size" selections work for anyone?
> (I know we have scaling inside Opera)

They won't work in my Opera 6.05. At first I thought the problem was the
external javascript they use for switching between different css
declarations, but on second thought the problem might also be Opera's own
lack of DOM support?

Best regards, Henk

Oscar Jacobsson

unread,
Oct 12, 2002, 5:53:09 PM10/12/02
to
Henk <vse...@COMMENTxs4all.nl> wrote in
<news:Xns92A5EB7D1DC20...@193.69.113.75>:

Yep. It's a DOM problem. Same as this one:

<URL:http://www.alistapart.com/stories/alternate/>

Also, they're using font-size keywords ("x-small") in the style sheet.
Opera presents keywords larger than both Mozilla and IE. This is not a
good thing, IMO. I hope this will be fixed in Opera 7. (I know Owen
Briggs agree with me on this one.)

And the image rollovers (in the navigation bar) doesn't seem to work as
intended in Opera either. I don't know what's going on there. The whole
background is white on hover in Mozilla and IE, but not in Opera.

--
Oscar Jacobsson

To reply, send email to:
<livingdots at yahoo dot com>

Tim Rivera

unread,
Oct 12, 2002, 8:02:28 PM10/12/02
to
> Opera presents keywords larger than both Mozilla and IE. This is not a
> good thing, IMO. I hope this will be fixed in Opera 7.

In my experience, Opera and IE render keyword font sizes the same, while
Mozilla and Netscape are on a different level. Unsized text is rendered as
"small" in Opera and IE, but "medium" in Mozilla and Netscape.

http://www.timrivera.com/tests/fontsize.html


Tim


R.A.G. Seely

unread,
Oct 12, 2002, 8:39:58 PM10/12/02
to
Henk <vse...@COMMENTxs4all.nl> wrote in
news:Xns92A5E427B6ED1...@193.69.113.75:

> But what I meant was some button (or a series of buttons, or a dropdown
> list) that would allow you to quickly activate a specific one out of
> *several* user-defined stylesheets.

Agreed - a dropdown menu on that "user vs author style" button would be a
nice touch.

> BTW, would you care to translate the Latin for me?

Occam's Razor - often translated as "entities must not be multiplied beyond
what is necessary". A frequent variant is "Pluralitas non est ponenda sine
neccesitate" or "plurality should not be posited without necessity." The
common modern variant might be "Keep it simple, stupid" I suppose! I
started using it as a newsgroup tag when I found I had to defend common
sense against folks who'd make the most unlikely claims based on nothing,
justifying themselves with the claim "well, it could be true, prove it
isn't". That is an old argument, and I thought a permanent reminder
wouldn't hurt.

Oscar Jacobsson

unread,
Oct 13, 2002, 2:55:26 AM10/13/02
to
"Tim Rivera" <timri...@hotmail.moc> wrote in
<news:aoad9h$jg9$1...@mail.opera.no>:

>> Opera presents keywords larger than both Mozilla and IE. This is not a
>> good thing, IMO. I hope this will be fixed in Opera 7.
>
> In my experience, Opera and IE render keyword font sizes the same, while

> Mozilla and Netscape are on a different level. [...]
>
> http://www.timrivera.com/tests/fontsize.html

Well, your testcase includes an XHTML 1.0 Transitional DTD with an XML
declaration which triggers "quirks mode" in IE6 (don't ask me why, but it
does): <URL:http://www.hut.fi/u/hsivonen/doctype.html>.

Let me clarify... Opera presents font-size keywords larger than Mozilla,
and larger than IE5.x/Mac and IE6 in *standards mode*.

I've uploaded screenshots and code here:

http://w1.265.telia.com/~u26503001/opera/bugs/font-size/

Also, take a look at Owen Briggs screenshots:

http://www.thenoodleincident.com/tutorials/box_lesson/font/singles/key.html

As you can see "small" means the exact same thing in all browsers, except
in Opera -- which is actually copying IE5.x/Win and IE6/Win "quirks mode"
behavior. That's not good. It needs to be changed, IMO.

Tim Rivera

unread,
Oct 13, 2002, 3:26:09 AM10/13/02
to
> Let me clarify... Opera presents font-size keywords larger than Mozilla,
> and larger than IE5.x/Mac and IE6 in *standards mode*.

Oh great, even the font size is different between IE6 quirks and standards
mode? IE is so crazy, I wish it would die with NN4. BTW, does anybody know
of a list of the differences between the two modes?


Tim


Henk

unread,
Oct 13, 2002, 9:12:55 AM10/13/02
to
"R.A.G. Seely" <rags__A@T__math.mcgill.ca.invalid> wrote:

> Occam's Razor - often translated as "entities must not be multiplied
> beyond what is necessary". A frequent variant is "Pluralitas non est
> ponenda sine neccesitate" or "plurality should not be posited without
> necessity." The common modern variant might be "Keep it simple,
> stupid" I suppose! I started using it as a newsgroup tag when I found
> I had to defend common sense against folks who'd make the most
> unlikely claims based on nothing, justifying themselves with the claim
> "well, it could be true, prove it isn't". That is an old argument,
> and I thought a permanent reminder wouldn't hurt.

Thank you! As a reminder, I think you surely have a very valid point here.
Only, wouldn't it be more in line with this very point, to use a more
commonly understood language here? ;-)

Oscar Jacobsson

unread,
Oct 13, 2002, 9:14:08 AM10/13/02
to
"Tim Rivera" <timri...@hotmail.moc> wrote in
<news:aob79s$o8a$1...@mail.opera.no>:

>> Let me clarify... Opera presents font-size keywords larger than
>> Mozilla, and larger than IE5.x/Mac and IE6 in *standards mode*.
>
> Oh great, even the font size is different between IE6 quirks and
> standards mode? IE is so crazy, I wish it would die with NN4.

Exactly. BTW, one point that I forgot to make... I think most people would
agree with me that it would be more logical if the font-size keyword
"medium" meant the same as the default font-size in any browser, which
unfortunately is not the case in Opera today:

http://w1.265.telia.com/~u26503001/opera/bugs/font-size/comparison.html

So it's not just a case of me wanting Opera to copy Mozilla and IE6's
behavior here. (Even though both Mozilla and IE6 -- in "standards mode" --
has this very behavior.) I just don't think that Operas way of displaying
font-size keywords makes much sense.

Oscar Jacobsson

unread,
Oct 13, 2002, 9:33:34 AM10/13/02
to
Oscar Jacobsson <add...@in-sig.invalid> wrote in
<news:Xns92A69A5A3A...@193.69.113.75>:

Ah! And check out the CSS 2.1 specification:

http://www.w3.org/TR/CSS21/fonts.html#value-def-absolute-size

So if Opera 7 will have full support of CSS 2.1 then they will actually
*have to* change this. Yay! I didn't know that.

Adam i Agnieszka Gasiorowski FNORD

unread,
Oct 13, 2002, 11:27:44 AM10/13/02
to
Whappo wrote:

They pretend Opera does not exist, though, don't
they...

--
O seksie, sekszeniu, seksolatkach...-> news:pl.soc.seks.moderowana <- :8)
Nazywam się Opera 7, Opera 007... http://www.opera.com
($) (anomia przyjaciółką twą) {~} Free Noni! Winona Is Innocent! (0700).
http://hyperreal.info | http://szatanowskie-ladacznice.0-700.pl | SiRE^23

Adam i Agnieszka Gasiorowski FNORD

unread,
Oct 13, 2002, 11:32:37 AM10/13/02
to
Tim Rivera wrote:

I bet micro$oft declares it to be a trade secret ;8).

Whappo

unread,
Oct 13, 2002, 7:51:14 PM10/13/02
to
> They pretend Opera does not exist, though, don't
> they...
>
> --

By not mentioning it? I see your point, but for a major site
like Wired to be championing web 'standards' is a big step
in the right direction. I can overlook their omission.


Jonny Axelsson

unread,
Oct 14, 2002, 12:48:43 PM10/14/02
to

Another major site, also using only valid XHTML and CSS went public today.
Which one? Well, you don't have to look too far away...


Jonny Axelsson
Documentation,
Opera software


Adam i Agnieszka Gasiorowski FNORD

unread,
Oct 15, 2002, 11:41:30 AM10/15/02
to
Whappo wrote:

> > They pretend Opera does not exist, though, don't
> > they...
>

> By not mentioning it? I see your point, but for a major site
> like Wired to be championing web 'standards' is a big step
> in the right direction. I can overlook their omission.

Sure. I was just whining :8).

Christoph Schneegans

unread,
Oct 17, 2002, 7:38:50 PM10/17/02
to
Jonny Axelsson wrote:

> Another major site, also using only valid XHTML and CSS went
> public today.

Another one? wired.com is not even well-formed, and
<http://www.htmlhelp.com/tools/validator/> shows many violations of
validity constraints on opera.com, e.g. check
<http://www.opera.com/download/>.

--
<http://schneegans.de/>

Ole Kasper Olsen

unread,
Oct 18, 2002, 9:25:44 AM10/18/02
to
Christoph Schneegans wrote:

> Another one? wired.com is not even well-formed,

Geez, what do you expect? Staff writers who've been using <i> to
create emphasis in the past, will continue to do so no matter how
much you nag them. People *will* forget to write &amp; rather than
just & etc... I find wired.com's standards-compliance attempt pretty
darn good, given the size and the amount of people they must have
emplyed to post stuff there.

DarkElf

unread,
Oct 18, 2002, 9:40:15 AM10/18/02
to
Christoph Schneegans <Chri...@Schneegans.de> wrote in
news:aonon9...@news.christoph.schneegans.de:

>
> Another one? wired.com is not even well-formed, and
> <http://www.htmlhelp.com/tools/validator/> shows many violations of
> validity constraints on opera.com, e.g. check
> <http://www.opera.com/download/>.
>

Most of these violations are due to the server-added ad content, over
which the webmasters have no control.

I suppose they might have attempted including it in CDATA blocks or
something, but that'd probably break it's functionality (and what a
shame that would be :D)

Wired's redesign is a huge leap forwards -- now if only some of the GUI
tools were to be redesigned to write valid code, we might even get rid
of this awful HTML soup, and come into an ero of clean, fast, XML+CSS
before the end of 2005.

--
Jor | "Let him that would move
.-. | the world first move
.-. | himself." - Socrates

Howard Brazee

unread,
Oct 18, 2002, 10:07:48 AM10/18/02
to

On 18-Oct-2002, Ole Kasper Olsen <ole....@hig.no> wrote:

> Geez, what do you expect? Staff writers who've been using <i> to
> create emphasis in the past, will continue to do so no matter how
> much you nag them. People *will* forget to write &amp; rather than
> just & etc... I find wired.com's standards-compliance attempt pretty
> darn good, given the size and the amount of people they must have
> emplyed to post stuff there.

Copying my bookmark file between browsers using utilities keeps converting names
such as "Bed & Breakfasts" to "Bed &amp; Breakfasts". I find this a huge
inconvenience, as searching through and locating them isn't easy.

Christoph Schneegans

unread,
Oct 18, 2002, 10:30:29 AM10/18/02
to
Ole Kasper Olsen wrote:

> Geez, what do you expect? Staff writers who've been using <i> to
> create emphasis in the past, will continue to do so no matter how
> much you nag them. People *will* forget to write &amp; rather than
> just & etc...

Today, XHTML has almost no benefit on the user agent side, since most
browsers don't support the application/xhtml+xml MIME type, see
<http://www.hut.fi/u/hsivonen/xhtml-the-point>. [1]

The only "valid" motivation for XHTML is the author's ability to use XML
tools. (This can be a major advantage, of course.) But XML tools don't
output ill-formed documents, so I really don't understand what wired.com
is doing. Well-formedness is not "nice to have", it's essential for
XHTML.

[1] I think there's an alternative approach, see the "mod_rewrite"
section on <http://schneegans.de/tips/apache-xhtml.html>.

--
<http://schneegans.de/>

Jonny Axelsson

unread,
Oct 19, 2002, 7:47:03 AM10/19/02
to
On Fri, 18 Oct 2002 15:25:44 +0200, Ole Kasper Olsen <ole....@hig.no>
wrote:


I too applaud wired.com. When it comes to errors, there are three levels:

Well-formedness errors -- pure syntax errors -- *must not occur*. Example:
<b><i>Not properly nested</b></i> (must be <b><i>...</i></b>). In a proper
and controlled environment there is no reason for this to happen. But you
can get input from other environment and you have all your existing
documents. Even so, this is serious, and should never happen with any
published document calling itself XHTML. XML has draconian rules for these
kinds of errors: the browser must stop processing the page immediately.

So how can this happen? Both wired.com and opera.com are "cheating", they
have to. The format may be XHTML, but it is sent as HTML (media types
application/xhtml+xml and text/html respectively).

Those of you that remember the Opera press release sent as XHTML, a year ago
next week, know why: Internet Explorer fails horribly on true XHTML pages.
Other browsers might display the page as text, or as a file to download,
because they don't recognize the media type. Even Opera 6 has quirks, some
are quite serious. Not sending XHTML pages as text/html is not an option for
commercial sites for years to come, and then you lose the built-in XML error
correction service. You have to do it yourself.


Validity errors breaks rules of what should be where, and sometimes what
values they are allowed to have. <b><p>A bold paragraph.</p></b> is wrong,
it should be <p><b>A bold paragraph.</b></p> because B is allowed inside P,
but P is not allowed inside B. This is a much less serious class of error. A
browser might not display the page as the author intended (for instance by
not making the paragraph bold, or ignoring a font tag entirely), but no
great harm is done. The error is local and likely minor, nothing like the
havoc a well-formedness error like an unclosed <script> or <table> can
cause. When XML is used for data processing, even validity errors can be
serious (wrong data or data at the wrong place).


Finally you have misuse of tags, where you use the tags for a side-effect,
for instance wrap a text in <blockquote> because of the nice indenting. I am
an official non-worrier about people using <i> where they could have used
<em>, this has no practical consequence. Using <em> where <i> should have
been used is worse. Or misusing <code>, <table>, <address>, <code>, <li>...
A system can only judge content, it can't judge intent.


So for well-formedness errors even a single error must be fixed, starting
immediately. I am much more forgiving for validity errors. Formally that
means a page isn't XHTML (only valid XHTML pages are XHTML), and the error
should be fixed. But if the error is trivial--and the errors I have seen for
wired.com and the one for opera.com are all in this category--it really
isn't that important. There might be more pressing problems to attend to (in
the case of opera.com that would be fixing those remaining 404s).


Jonny Axelsson,
Documentation,
Opera Softare


Martin Schrode

unread,
Oct 19, 2002, 9:53:43 AM10/19/02
to
* "Whappo" <Wha...@operamail.com> wrote:
> Don't know if any of you visit Wired News but their new page
> design, using XHTML and CSS, is very slick. Good job Wired.

So, do you think it's mean adding the following to your custom
style sheet ("Page style | My style sheet"):

.adTxtBox{ display:none ! important; }
.adSky { display:none ! important; }
.ad728 { display:none ! important; }

and maybe even

.genBlock { display:none ! important; }

I use "Show cached images only" and the Internet Junkbuster so I
wouldn't see them anyway. But I like the display:none solution
even better -- It makes the article more readable. :)

Martin Schrode

unread,
Oct 19, 2002, 2:51:33 PM10/19/02
to
* "Martin Schrode" <use...@schrode.net> wrote:
> So, do you think it's mean adding the following to your custom style
> sheet ("Page style | My style sheet"):
>
> .adTxtBox, .adSky, .ad728 { display:none ! important; }

Using attributes is kinda risky but seems to work well:

table[width="468"] { display:none ! important; }

img[alt="Click Here"], img[alt="Click here"], img[alt="Click here!"] {
display:none ! important;
}

Just one question: Is it possible to combine attributes, e.g., filter
images that are 468x60 <img src="ad.jpg" width="468" height="60">? I
can use

img[width="468"] { display:none ! important; }

but I can't add a second attribute:

img[width="468" height="60"] { display:none ! important; }
img[width="468"][height="60"] { display:none ! important; }

Is this a limitation of Opera, CSS or my coding? How can it be done?

Also the "~=" operator doesn't always seem to work:

img[alt~="Click here"] { display:none ! important; }

Shouldn't that hide both "Click here" and "Click here!" images? Instead
it hides neither.

I always thought ads with "Click here!" ALT tags were quite stupid. Now
I like them. :)

Christoph Schneegans

unread,
Oct 19, 2002, 5:15:55 PM10/19/02
to
Jonny Axelsson wrote:

> I too applaud wired.com. When it comes to errors, there are three
> levels:

Exactly. And thanks for this nice overview.

> Well-formedness errors -- pure syntax errors -- *must not occur*.

But they do occur on wired.com. Am I the only one to see this?

<a href="http://www.scientificamerican.com/article.cfm?chanID=sa003&articleID=0007BAC3-CD4F-1DAD-94E2809EC5880108">

as currently visible on <http://www.wired.com/> is not well-formed, they
should have written "&amp;" instead of "&".

--
<http://schneegans.de/>

Jonny Axelsson

unread,
Oct 20, 2002, 7:46:31 AM10/20/02
to
On Sat, 19 Oct 2002 20:51:33 +0200, Martin Schrode <use...@schrode.net>
wrote:

> Using attributes is kinda risky but seems to work well:
> table[width="468"] { display:none ! important; }

Attribute selectors in Opera works well, and has for the longest time (I
believe we were the first to support them). They also works well in Mozilla.

> but I can't add a second attribute:
>
> img[width="468" height="60"] { display:none ! important; }
> img[width="468"][height="60"] { display:none ! important; }
>
> Is this a limitation of Opera, CSS or my coding? How can it be done?

The first one is wrong, the second is right (and supported)
img[width="468"], img[height="60"] /* Either width="468" or height="60" */
img[width="468"][height="60"] /* Both width="468" and height="60" */

> Also the "~=" operator doesn't always seem to work:

Does so...


> img[alt~="Click here"] { display:none ! important; }
>
> Shouldn't that hide both "Click here" and "Click here!" images? Instead
> it hides neither.

No, it will not match anything.

Quoting <http://www.w3.org/TR/CSS2/selector.html#q10>:
[att~=val]
Match when the element's "att" attribute value is a space-separated
list of "words", one of which is exactly "val". If this selector is
used, the words in the value must not contain spaces (since they
are separated by spaces).

"Click here" is not a valid value for this selector, "Click" and "here" are
valid values. These are literal strings, "here" will not match "here!" and
"Click" will not match "click" in alt (alt is a case-sensitive attribute).

As above you can combine the selectors, img[alt~="Click"][alt~="here] will
match any img alt string that contains the words "Click" and "here" in any
order.


Jonny Axelsson,
Documentation,
Opera Software

Martin Schrode

unread,
Oct 20, 2002, 11:19:14 PM10/20/02
to
* "Jonny Axelsson" <j...@opera.no> wrote:
> Martin Schrode <use...@schrode.net> wrote:
>> Using attributes is kinda risky but seems to work well:
>> table[width="468"] { display:none ! important; }
>
> Attribute selectors in Opera works well, and has for the longest
> time (I believe we were the first to support them). They also
> works well in Mozilla.

With "risky" I meant, it's risky because this "rule" might catch
regular tables instead of ads.

>> but I can't add a second attribute:
>>
>> img[width="468" height="60"] { display:none ! important; }
>> img[width="468"][height="60"] { display:none ! important; }
>

> The first one is wrong, the second is right (and supported)

You're right. I must have made some other mistake (missing comma or a
comma too much), or maybe I was using a poor example ...

> img[width="468"][height="60"] /* Both width="468" and height="60" */

What works fine. I like it! But I am having troubles with tables:

<table border="0" align="right" width="200" cellpadding="3">

I thought the safest way to "filter" it, was to use as many attributes
as possible:

table[border="0"][align="right"][width="200"][cellpadding="3"] {
display:none ! important;
}

But that doesn't work (Opera 6.1b1 Linux). The following (reduced set)
works:

table[width="200"][cellpadding="3"] {
display:none ! important;
}

border="0" and align="right" never seems to work.

>> Also the "~=" operator doesn't always seem to work:
>
> Does so...

Thanks for the explanation. Thought I could use it for some "regular
expressions", but I will just stick with this then:

img[alt="Click here"], img[alt="Click Here"], img[alt="Click here!"]
{ display:none ! important; }

Jonny Axelsson

unread,
Oct 21, 2002, 4:13:11 AM10/21/02
to
On Mon, 21 Oct 2002 05:19:14 +0200, Martin Schrode <use...@schrode.net>
wrote:

> What works fine. I like it! But I am having troubles with tables:


> <table border="0" align="right" width="200" cellpadding="3">

> border="0" and align="right" never seems to work.

I have no problem with selecting on border (attribute or value), but align
value seems broken (the align attribute itself is fine). IWIO7 (It works in
Opera 7).




> Thanks for the explanation. Thought I could use it for some "regular
> expressions", but I will just stick with this then:
>
> img[alt="Click here"], img[alt="Click Here"], img[alt="Click here!"]
> { display:none ! important; }

The basic idea was sound. I can't promise you regular expressions, but the
Selectors working draft for CSS3 propose some new substring matching
selectors, <http://www.w3.org/TR/css3-selectors/#attribute-substrings>. Back
to CSS2, something like:

img[alt~="click"][alt~="here"],
img[alt~="Click"][alt~="here"],
img[alt~="Click"][alt~="here!"],
img[alt~="Click"][alt~="Here"] { display:none ! important; }

will work, and shouldn't give too many false positives. It also shows the
limit of selectors for advanced string selection (the numbers of selectors
explode).

Martin Schrode

unread,
Oct 21, 2002, 12:25:20 PM10/21/02
to
* "Jonny Axelsson" <j...@opera.no> wrote:
> The basic idea was sound. I can't promise you regular expressions, but
> the Selectors working draft for CSS3 propose some new substring
> matching selectors,

I just noticed that I have to escape the dot in ALT tags, e.g.,

img[alt="CNN\.com"], img[alt="U\.S\."] {
display:none ! important;
}

But unfortunately, img[alt=".lick .ere"] doesn't work (I didn't really
expect it to work). That leaves the question, why do I have to escape
the dot (".")? Or is this a bug in Opera for Linux?

I'll stop here. This works better than I expected. Some simple rules and
all the ads are gone! Of course I'll still have to use The Internet
Junkbuster to avoid loading the images but now even the empty
rectangles of images that have height and width attribute won't be
displayed (No more "Click here!"s). Web pages look so much cleaner now.

In case anyone wants to test it, here are some simple rules that will
probably catch 90 % of all ads w/o too many false positives:


/* general ads by size */
*[width="468"][height="60"], *[width="234"][height="60"],
*[width="120"][height="60"], *[width="180"][height="250"],
*[width="336"][height="280"], *[width="125"][height="800"],
*[width="120"][height="600"], *[width="480"][height="60"] {
display:none ! important;
}
/* general ads by ALT text */
img[alt="Click Here"], img[alt="Click here"], img[alt="Click here!"],
img[alt="Alt Text"] {
display:none ! important;
}
/* ads and banner divs */
*[name="banner"], .banner, .banner1, .banner2, .banner3, .banner4,
.banners, .ads, .ad, .ad1, .ad2, .ad3, .ad4 {
display:none ! important;
}
/* Wired.com */


.adTxtBox, .adSky, .ad728 { display:none ! important; }

/* cnn.com */
.textad, .aoltextad { display:none ! important; }


It's easy to test if the only difference between Opera's Author and User
mode is a selected "My Style Sheet".

I couldn't find any performance problems but how "expensive" are these
changes in Opera?

The best thing is, you don't have to install any additional software
and it's quite easy to adjust the "rules".

Tim

unread,
Oct 22, 2002, 3:25:47 AM10/22/02
to
On 18-Oct-2002, Ole Kasper Olsen <ole....@hig.no> wrote:

>> Geez, what do you expect? Staff writers who've been using <i> to
>> create emphasis in the past, will continue to do so no matter how
>> much you nag them. People *will* forget to write &amp; rather than
>> just & etc... I find wired.com's standards-compliance attempt pretty
>> darn good, given the size and the amount of people they must have
>> emplyed to post stuff there.


On Fri, 18 Oct 2002 14:07:48 GMT,
"Howard Brazee" <howard...@cusys.edu> wrote:

> Copying my bookmark file between browsers using utilities keeps converting names
> such as "Bed & Breakfasts" to "Bed &amp; Breakfasts". I find this a huge
> inconvenience, as searching through and locating them isn't easy.

For HTML (I never remember the rules for XHTML, as i don't use it),
that's not necessary. An ampersand can be used by itself, in certain
situations; where it's *not* ambiguous whether it's part of a character
entity, or not. An ampersand with a blank space after it is *clearly*
not part of a character entity (to define that in simple human terms).

For cases where you *must* use &amp; instead of &, you could run a tool
to automatically parse the file, doing it for you.

--
My "from" address is totally fake. (Hint: If I wanted e-mails from
complete strangers, I'd have put a real one, there.) Reply to usenet
postings in the same place as you read the message you're replying to.

Jonny Axelsson

unread,
Oct 22, 2002, 6:46:24 AM10/22/02
to
On Mon, 21 Oct 2002 18:25:20 +0200, Martin Schrode <use...@schrode.net>
wrote:

> I just noticed that I have to escape the dot in ALT tags, e.g.,
>
> img[alt="CNN\.com"], img[alt="U\.S\."] {
> display:none ! important;
> }
>
> But unfortunately, img[alt=".lick .ere"] doesn't work (I didn't really
> expect it to work). That leaves the question, why do I have to escape
> the dot (".")? Or is this a bug in Opera for Linux?

Repeat after me: CSS Is Not Perl... You should not need to escape '.' inside
quoted strings (<http://www.w3.org/TR/CSS2/grammar.html> for a reference),
but you would need to escape it elsewhere.

<p class="opera.com">...</p> is valid HTML (class="http://www.opera.com" is
not, since '/' is not allowed in class values). To refer to that in a CSS
class selector you would need to write:

opera\.com {/* whatnot */}

0 new messages