473,320 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Specifying multiple cursor types - invalid, right?

The following declaration was posted to a forum:

cursor: url('path/some.cur'), hand, pointer, text, default;

and I'm having a hard time convincing the poster that it's invalid.

First of all, I suppose it should be established that it /is/ invalid.
The following excerpt is taken from the CSS 2 specification (and
appears unaltered in CSS 2.1):

'cursor'

Value: [ [<uri> ,]* [ auto | crosshair | default | pointer | move
| e-resize | ne-resize | nw-resize | n-resize | se-resize
| sw-resize | s-resize | w-resize | text | wait | help ] ]
| inherit

Clearly, only one keyword may appear in a single declaration, and only
multiple URI values can appear, separated by commas. However, if a
user agent encounters a declaration that doesn't follow that pattern,
what is the expected behaviour?

I would have assumed that the declaration would be marked erroneous
and ignored, but it seems - at least with the W3C validator - that
anything after the first keyword is ignored[1]. Could the reason be
that the first keyword encountered simply stops the parser from
iterating over the remaining values? If that is so, shouldn't the
validator continue so it can alert the author to the problem?

I realise that validators are but tools and are no substitute for
sound knowledge of the language they attempt to test, but try
explaining that to some people...

Mike
[1] The order of the keywords in the example should be changed so that
'hand' isn't the first to be encountered.

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 21 '05 #1
6 3321
Michael Winter schrieb:
The following declaration was posted to a forum:

cursor: url('path/some.cur'), hand, pointer, text, default;

and I'm having a hard time convincing the poster that it's invalid.

First of all, I suppose it should be established that it /is/ invalid.
The following excerpt is taken from the CSS 2 specification (and appears
unaltered in CSS 2.1):

'cursor'

Value: [ [<uri> ,]* [ auto | crosshair | default | pointer | move
| e-resize | ne-resize | nw-resize | n-resize | se-resize
| sw-resize | s-resize | w-resize | text | wait | help ] ]
| inherit

Clearly, only one keyword may appear in a single declaration, and only
multiple URI values can appear, separated by commas. However, if a user
agent encounters a declaration that doesn't follow that pattern, what is
the expected behaviour?

I would have assumed that the declaration would be marked erroneous and
ignored, but it seems - at least with the W3C validator - that anything
after the first keyword is ignored[1]. Could the reason be that the
first keyword encountered simply stops the parser from iterating over
the remaining values? If that is so, shouldn't the validator continue so
it can alert the author to the problem?

I realise that validators are but tools and are no substitute for sound
knowledge of the language they attempt to test, but try explaining that
to some people...

Mike
[1] The order of the keywords in the example should be changed so that
'hand' isn't the first to be encountered.


To add: hand should not be used because it is M$ only and not recognized
by Firefox.

Klaus
Jul 21 '05 #2
Klaus Krtschil wrote:

[snip]
To add: hand should not be used
In general it shouldn't...
because it is M$ only [...]


but if versions prior to IE6 are a concern, using 'hand' will be a
necessity.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 21 '05 #3
On Wed, 09 Mar 2005 18:45:09 +0100 Klaus Krtschil wrote:
Michael Winter schrieb:
The following declaration was posted to a forum:

cursor: url('path/some.cur'), hand, pointer, text, default;

and I'm having a hard time convincing the poster that it's invalid.

First of all, I suppose it should be established that it /is/ invalid.
The following excerpt is taken from the CSS 2 specification (and appears
unaltered in CSS 2.1):

'cursor'

Value: [ [<uri> ,]* [ auto | crosshair | default | pointer | move

|> e-resize | ne-resize | nw-resize | n-resize | se-resize
|> sw-resize | s-resize | w-resize | text | wait | help ] ]
|> inherit

Clearly, only one keyword may appear in a single declaration, and only
multiple URI values can appear, separated by commas. However, if a user
agent encounters a declaration that doesn't follow that pattern, what is
the expected behaviour?

I would have assumed that the declaration would be marked erroneous and
ignored, but it seems - at least with the W3C validator - that anything
after the first keyword is ignored[1]. Could the reason be that the
first keyword encountered simply stops the parser from iterating over
the remaining values? If that is so, shouldn't the validator continue so
it can alert the author to the problem?

I realise that validators are but tools and are no substitute for sound
knowledge of the language they attempt to test, but try explaining that
to some people...

Mike
[1] The order of the keywords in the example should be changed so that
'hand' isn't the first to be encountered.


To add: hand should not be used because it is M$ only and not recognized
by Firefox.

Klaus


Firefox will accept the cursor statement.
I've done it before.
Jul 21 '05 #4
On Wed, 09 Mar 2005 16:15:01 GMT Michael Winter wrote:
The following declaration was posted to a forum:

cursor: url('path/some.cur'), hand, pointer, text, default;

and I'm having a hard time convincing the poster that it's invalid.

First of all, I suppose it should be established that it /is/ invalid.
The following excerpt is taken from the CSS 2 specification (and
appears unaltered in CSS 2.1):

'cursor'

Value: [ [<uri> ,]* [ auto | crosshair | default | pointer | move |> e-resize | ne-resize | nw-resize | n-resize | se-resize
|> sw-resize | s-resize | w-resize | text | wait | help ] ]
|> inherit
Clearly, only one keyword may appear in a single declaration, and only
multiple URI values can appear, separated by commas. However, if a
user agent encounters a declaration that doesn't follow that pattern,
what is the expected behaviour?

I would have assumed that the declaration would be marked erroneous
and ignored, but it seems - at least with the W3C validator - that
anything after the first keyword is ignored[1]. Could the reason be
that the first keyword encountered simply stops the parser from
iterating over the remaining values? If that is so, shouldn't the
validator continue so it can alert the author to the problem?

I realise that validators are but tools and are no substitute for
sound knowledge of the language they attempt to test, but try
explaining that to some people...

Mike
[1] The order of the keywords in the example should be changed so that
'hand' isn't the first to be encountered.

It would appear the person is attempting to create their own set of rules.
What would be the point of trying to force the use of a cursor style
enmasse?
Is the person thinking he can trick the browser into a multiple guess
situation and use which ever one is best suited or what?
Obviously the person hasn't even bothered to understand what can be applied
to the statement.
If I'm not sure of what's allowed in a condition, I will most certainly use
the resources of the WWW and find out.
And just maybe the person just does not understand what | means.
Jul 21 '05 #5
Richard wrote:

[snip]
Is the person thinking he can trick the browser into a multiple guess
situation and use which ever one is best suited or what?
I believe the intent was to use the behaviour a user agent should
adopt when given a list of URI values: if the first resource is
unsupported, use the second, and so on.
Obviously the person hasn't even bothered to understand what can be applied
to the statement.
The person is an idiot who refuses to accept he's wrong. The problem
is that he seems to think that the validator supports his case. That's
why I brought that up. He even thought that a W3C example - two URI
values, followed by a keyword - somehow proved me wrong.
If I'm not sure of what's allowed in a condition, I will most certainly use
the resources of the WWW and find out.
There's no need. I was confident in my assessment, but it's nice to
have someone say, "You're right." I'm assuming (and it's generally a
fairly safe assumption on Usenet) that as none of the regulars have
jumped on what I've said as latently wrong, that I am in fact correct.
And just maybe the person just does not understand what | means.
No, I explained the notation and walked through what the specification
states, as a result.

[From your other post:]
Firefox will accept the cursor statement.


Klaus wasn't saying that the cursor property is proprietary, but that
the hand value (Microsoft's early equivalent to pointer) is, which is
correct.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 21 '05 #6
*Michael Winter* <m.******@blueyonder.co.invalid>:

cursor: url('path/some.cur'), hand, pointer, text, default;

First of all, I suppose it should be established that it /is/ invalid.


It is indeed, but you might want to ask on www-style whether it is really
intended to be. If it's not, it's not yet too late to be changed in
CSS*2.1.

Anyhow, the IE 'hand' issue is usually resolved with multiple 'cursor'
rules inside one ruleset.

--
"For every human problem, there is a neat, simple solution;
and it is always wrong." H. L. Mencken
Jul 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Alban Hertroys | last post by:
Oh no! It's me and transactions again :) I'm not really sure whether this is a limitation of psycopg or postgresql. When I use multiple cursors in a transaction, the records inserted at the...
8
by: Dave Moore | last post by:
Is there any way to specify an istream separator sequence? For example, suppose I have a record consisting of a list of comma-separated values (no whitespace). I want to set the istream up so that...
32
by: tshad | last post by:
Can you do a search for more that one string in another string? Something like: someString.IndexOf("something1","something2","something3",0) or would you have to do something like: if...
0
by: haegens | last post by:
I am making a .NET Application which has a TreeView Control in it. I have 3 levels of nodes. The toplevel is a rootnode which contains all other nodes. The second level holds one kind of nodes that...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.