Re: dollar sign in CSS variable

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 UTC