W3C home > Mailing lists > Public > www-international@w3.org > January to March 2011

Re: dollar sign in CSS variable

From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Mon, 14 Feb 2011 11:32:44 +0100
To: Kang-Hao (Kenny) Lu <kennyluck@w3.org>
Cc: WWW International <www-international@w3.org>
Message-ID: <20110214113244608967.d428580a@xn--mlform-iua.no>
Kang-Hao (Kenny) Lu, Mon, 14 Feb 2011 08:39:49 +0900:

> Taking a little look at a Wikipedia entry[3], in several keyboard
> layouts, including the Danish and Estonian, the dollar sign can't be
> reached with only the shift key. As far as I know, Perl and PHP use the
> dollar sign as certain variable indicator, but I googled and find no
> complaints about this. I wondering it is considered OK in the
> perspective of internationalization to introduce the dollar sign to CSS.

I did not know that Danish programmers had to suffer more than 
Norwegian in this regard ...  

Nevertheless, the popular TextMate.app - which is made by a Dane - is 
the first, and only (?) text editor I have used which uses '$n' instead 
of '\n' for found expressions/matches in RegEx.  When I asked why, I 
got the answer that it was because expression matches were similar to 
variables.  

In that regard, perhaps '\' could be used instead of '$'?  However '\' 
requires Shift-Alt on a Norwegian keyboard, just as '$' requires the 
same on a Danish keyboard.  Plus that '\' is already used for CSS 
character escaping.

It was, to begin with, confusing and surprising that TextMate.app used 
'$' instead of '\'.  And, I think that CSS variables should use a 
character that authors would expect/find unsurprising.

Users of non-US keyboards are probably quite used to shortcuts such as 
Alt-Shift-Character.  At least I am ...

> I had an uncomfortable experience to find the hash on an Italian
> keyboard (because in the world of Semantic Web/Linked Data, the hash is
> widely used), and the Italian girl told me that it isn't that easy for
> her too. What about the dollar sign?

Mac OS X offers 2 Italian keyboard layouts.  The 'normal' layout 
requires that one presses Shift to get the '#'.  The 'pro' version 
requires that one presses the Alt to get it.  But, yes, the PC users 
seem to have press Alt-Shift-Character.

For my own part, I often have had problems locating the '@' on 
Norwegian PC keyboard ... It requires Alt + Shift, whereas the Mac 
layout requires neither Shift nor ALt - it can be typed directly.

In a summary, I agree that '$' is fine.

> [3] http://en.wikipedia.org/wiki/Keyboard_layout
-- 
leif halvard silli
Received on Monday, 14 February 2011 10:33:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 14 February 2011 10:33:20 GMT