473,385 Members | 1,720 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,385 software developers and data experts.

Brackets and the Invention of CSS

Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?

p [margin: 0;]

is two key presses shorter then

p {margin: 0;}

Multiply that by a few billion over the world of css, taking in
to account a lot of consequences including the bigger chance of
typos and revisions, the greater expenditure of energy on people
and processors, more wear and tear on the keyboard.

--
dorayme
Nov 24 '07 #1
37 2477
dorayme wrote:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?

p [margin: 0;]

is two key presses shorter then

p {margin: 0;}

Multiply that by a few billion over the world of css, taking in
to account a lot of consequences including the bigger chance of
typos and revisions, the greater expenditure of energy on people
and processors, more wear and tear on the keyboard.
Square brackets are for attribute selectors. A useful but not often used
feature because of IE.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Nov 24 '07 #2
In article <4d***************************@NAXS.COM>,
"Jonathan N. Little" <lw*****@centralva.netwrote:
dorayme wrote:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?

p [margin: 0;]

is two key presses shorter then

p {margin: 0;}

Multiply that by a few billion over the world of css, taking in
to account a lot of consequences including the bigger chance of
typos and revisions, the greater expenditure of energy on people
and processors, more wear and tear on the keyboard.

Square brackets are for attribute selectors. A useful but not often used
feature because of IE.
So... are you are implying perhaps that it was anticipated that
the square brackets would have been used more often?

--
dorayme
Nov 24 '07 #3
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?
Perhaps to build upon existing conventions. Perhaps on some keyboards
square brackets actually are harder to type. Perhaps they tossed a coin.
p [margin: 0;]

is two key presses shorter then

p {margin: 0;}
So is p {margin:0}

--
Sander Tekelenburg
The Web Repair Initiative: <http://webrepair.org/>
Nov 24 '07 #4
On 2007-11-24, dorayme wrote:
>

Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?

p [margin: 0;]

is two key presses shorter then

p {margin: 0;}
It's only one key press shorter for me; when I press { in a .css
file, the closing brace is automatically inserted.
Multiply that by a few billion over the world of css, taking in
to account a lot of consequences including the bigger chance of
typos and revisions, the greater expenditure of energy on people
and processors, more wear and tear on the keyboard.

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Nov 24 '07 #5
dorayme <do************@optusnet.com.auwrites:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?
I suspect it's a question of familiarity - JavaScript, C, Perl, and
many other languages with which many web developers may be familiar
all use curly brackets.

By contrast, not too many devs are writing web apps in SmallTalk or
Objective-C. Even fewer than there once were, no thanks to Apple. :-(

[ObjC retain];

sherm--

--
WV News, Blogging, and Discussion: http://wv-www.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
Nov 24 '07 #6
In article <us************************@textnews.euro.net>,
Sander Tekelenburg <us**@domain.invalidwrote:
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?

Perhaps to build upon existing conventions.
Which were?
Perhaps on some keyboards
square brackets actually are harder to type.
Well, that is a question, I might be seeing a biassed sample here
in Australia?
>
p [margin: 0;]

is two key presses shorter then

p {margin: 0;}

So is p {margin:0}
How do you figure this? And what is its relevance?

--
dorayme
Nov 24 '07 #7
In article <pc************@xword.teksavvy.com>,
"Chris F.A. Johnson" <cf********@gmail.comwrote:
On 2007-11-24, dorayme wrote:


Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?

p [margin: 0;]

is two key presses shorter then

p {margin: 0;}

It's only one key press shorter for me; when I press { in a .css
file, the closing brace is automatically inserted.
I vaguely recall something like this on this winbox I fire up now
and then (in a pgm called Topstyle). Similar perhaps is BBEdit's
built in control + 1 getting <h1></h1with the cursor seemingly
conveniently in between. All very well in a way. There are
drawbacks of course: you are typing away and you want a level one
heading and quickly realise it is a level 2 you want, oops... you
have to change two numbers. The normal typing way of putting the
opening tag would give you a chance (if you realise just after
typing the first 1) to merely back space on and carry on.

That reminds me, there is a whole lot of shifting going on for
for < and the greater than. But in this case, the inventors could
hardly have chosen instead the "," and "."

Perhaps a special html/css board is needed. <g>
Multiply that by a few billion over the world of css, taking in
to account a lot of consequences including the bigger chance of
typos and revisions, the greater expenditure of energy on people
and processors, more wear and tear on the keyboard.
--
dorayme
Nov 24 '07 #8
In article <m1************@dot-app.org>,
Sherman Pendley <sp******@dot-app.orgwrote:
dorayme <do************@optusnet.com.auwrites:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?

I suspect it's a question of familiarity - JavaScript, C, Perl, and
many other languages with which many web developers may be familiar
all use curly brackets.
Yes, I suspect this is probably the direct or indirect
motivation. I recall programming in Microsoft QuickBasic on a Mac
SE and there were few brackets involved and when they were they
were round or square (Remember those days Sherm?). Oddly enough I
forget about the later FutureBasic which I had to move to with
the PowerPC chip... I suppose Javascript and C and Perl are very
old compared to CSS...

--
dorayme
Nov 24 '07 #9
On 2007-11-24, dorayme <do************@optusnet.com.auwrote:
In article <us************************@textnews.euro.net>,
Sander Tekelenburg <us**@domain.invalidwrote:
>In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?

Perhaps to build upon existing conventions.

Which were?
It's common in programming languages for {} to go around bigger blocks
of stuff consisting of a few lines or more.

C, Tcl, Java, JavaScript, Perl, and Ruby are all examples where this is
the case.

I think you'd tend to use {} even when writing on paper with a pencil
for large blocks of stuff. So maybe that's where it comes from. () is
used in expressions like (2+3)*5, [] usually for array and/or dictionary
access, like a[2] or a["foo"], and {} to enclose several lines at a
time.
Nov 24 '07 #10
On 2007-11-24, dorayme <do************@optusnet.com.auwrote:
In article <m1************@dot-app.org>,
Sherman Pendley <sp******@dot-app.orgwrote:
>dorayme <do************@optusnet.com.auwrites:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?

I suspect it's a question of familiarity - JavaScript, C, Perl, and
many other languages with which many web developers may be familiar
all use curly brackets.

Yes, I suspect this is probably the direct or indirect
motivation. I recall programming in Microsoft QuickBasic on a Mac
SE and there were few brackets involved and when they were they
were round or square (Remember those days Sherm?). Oddly enough I
forget about the later FutureBasic which I had to move to with
the PowerPC chip... I suppose Javascript and C and Perl are very
old compared to CSS...
BASIC usually uses something like this:

if
bla blah
bla bla
endif

i.e. keywords mark the end of blocks, so you don't need {}. C and others
don't bother with endif. You just put everything after "if" in a block
delimited with {}.

It may relate to the way a traditional BASIC interpreter works-- pretty
much one line at a time without much in the way of parsing first, and
with the requirement that each line start with a keyword. Hence all
those pointless keywords like "LET" and "DIM".
Nov 24 '07 #11
dorayme schrieb:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?
On my (german) keyboard, I have to press AltGr + 8 for a square bracket
('[') and AltGr + 7 for a curly bracket ('{'). Maybe it's similar on a
norwegian keyboard.

--
Johannes Koch
Spem in alium nunquam habui praeter in te, Deus Israel.
(Thomas Tallis, 40-part motet)
Nov 24 '07 #12
dorayme schrieb:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?

p [margin: 0;]

is two key presses shorter then

p {margin: 0;}

Multiply that by a few billion over the world of css, taking in
to account a lot of consequences including the bigger chance of
typos and revisions, the greater expenditure of energy on people
and processors, more wear and tear on the keyboard.
There a lot of different keyboards in use. On my keyboard I have to
press AltGr to access the { and [ characters...
Klaus
--
Linux User #54760
Nov 24 '07 #13
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:
In article <us************************@textnews.euro.net>,
Sander Tekelenburg <us**@domain.invalidwrote:
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:
[...]
Perhaps on some keyboards
square brackets actually are harder to type.

Well, that is a question, I might be seeing a biassed sample here
in Australia?
Perhaps. I don't think I've ever seen a typical australian keybaord, if
such a thing exists. I'm assuming it's much like a 'typical' USA-ian
keyboard. From what I've seen, many european keyboards are quite
different (also amongst each other) from what appears to be common in
the USA. Those keyboards often provide single keys for often used
charcaters with accents, umlauts, ligatures, etc. at the cost of single
key access for other 'special characters', like brackets and such. If
you generally need an u-umlaut once every sentence, you'll want a single
key for that. (ASCII covers only 2 of the world's languages.)

And that's only looking at the relatively small minority that uses the
roman script. I expect that in the rest of the world there are even many
more and wildlier different keyboards in common use.
p [margin: 0;]
>
is two key presses shorter then
>
p {margin: 0;}
So is p {margin:0}

How do you figure this? And what is its relevance?
You seemed to complain about having to press too many keys, yet were
using a space and a semi-colon where they aren't necessary. (Whether
those in fact do require two key presses, or more, or less, of course
depends on the keyboard and the development environment you use ;))

--
Sander Tekelenburg, <http://www.euronet.nl/%7Etekelenb/>
Nov 24 '07 #14
dorayme <do************@optusnet.com.auwrites:
In article <m1************@dot-app.org>,
Sherman Pendley <sp******@dot-app.orgwrote:
>dorayme <do************@optusnet.com.auwrites:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?

I suspect it's a question of familiarity - JavaScript, C, Perl, and
many other languages with which many web developers may be familiar
all use curly brackets.

Yes, I suspect this is probably the direct or indirect
motivation. I recall programming in Microsoft QuickBasic on a Mac
SE and there were few brackets involved and when they were they
were round or square (Remember those days Sherm?).
Yep. I was writing GWBasic and Turbo Pascal for PCs back then. They didn't
have many brackets either. I kind of miss those days, a little bit anyway.
Programming was all about inventing new kinds of apps. Now it's just shaving
10 more seconds off the TPS Report Wizard to save our corporate masters a
few pennies.

I think that's part of the reason so many folks are into open-source these
days. It's the only way to have any fun as a programmer - writing code for
sale is just plain old boring work, complete with pointy-haired bosses and
office politics.

sherm--

--
WV News, Blogging, and Discussion: http://wv-www.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
Nov 24 '07 #15
dorayme wrote:
In article <4d***************************@NAXS.COM>,
"Jonathan N. Little" <lw*****@centralva.netwrote:
>dorayme wrote:
>>Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?

p [margin: 0;]

is two key presses shorter then

p {margin: 0;}

Multiply that by a few billion over the world of css, taking in
to account a lot of consequences including the bigger chance of
typos and revisions, the greater expenditure of energy on people
and processors, more wear and tear on the keyboard.
Square brackets are for attribute selectors. A useful but not often used
feature because of IE.

So... are you are implying perhaps that it was anticipated that
the square brackets would have been used more often?
Absolutely, many web designers would love to be able to use
attribute-based selectors. Also, the use of square brackets for
attribute-based selectors is consistent with the notation used in XPath.
Nov 24 '07 #16
Harlan Messinger wrote:
dorayme wrote:
>In article <4d***************************@NAXS.COM>,
"Jonathan N. Little" <lw*****@centralva.netwrote:
>>Square brackets are for attribute selectors. A useful but not often
used feature because of IE.

So... are you are implying perhaps that it was anticipated that the
square brackets would have been used more often?

Absolutely, many web designers would love to be able to use
attribute-based selectors. Also, the use of square brackets for
attribute-based selectors is consistent with the notation used in XPath.
If we had use of attribute selectors it could eliminate the need of many
classes peppered throughout the markup. (So as designers let's give
MS the ol' 1-fingered-salute right back!)

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Nov 24 '07 #17
On 2007-11-24, dorayme wrote:
"Chris F.A. Johnson" <cf********@gmail.comwrote:
>On 2007-11-24, dorayme wrote:
>

Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?

p [margin: 0;]

is two key presses shorter then

p {margin: 0;}

It's only one key press shorter for me; when I press { in a .css
file, the closing brace is automatically inserted.

I vaguely recall something like this on this winbox I fire up now
and then (in a pgm called Topstyle). Similar perhaps is BBEdit's
built in control + 1 getting <h1></h1with the cursor seemingly
conveniently in between. All very well in a way. There are
drawbacks of course: you are typing away and you want a level one
heading and quickly realise it is a level 2 you want, oops... you
have to change two numbers. The normal typing way of putting the
opening tag would give you a chance (if you realise just after
typing the first 1) to merely back space on and carry on.
I'd just press Undo and enter the one I wanted.
--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Nov 24 '07 #18
In article <us************************@textnews.euro.net>,
Sander Tekelenburg <us**@domain.invalidwrote:
dorayme wrote:
>
Perhaps on some keyboards
square brackets actually are harder to type.
Well, that is a question, I might be seeing a biassed sample here
in Australia?

Perhaps. I don't think I've ever seen a typical australian keybaord,
Likely to be same as in UK and other Commonwealth countries.
p [margin: 0;]

is two key presses shorter then

p {margin: 0;}
>
So is p {margin:0}
How do you figure this? And what is its relevance?

You seemed to complain about having to press too many keys, yet were
using a space and a semi-colon where they aren't necessary.
Ah! <g (... but really we are talking cost-benefit here)

Actually, it has given me the thought to look at programming keys
on a board to be used for html/css work that may better suit me.
I often use just one hand for adjustment work. (In case you were
wondering, the other hand is most often engaged in warding off
enemies - think Rugby...)

--
dorayme
Nov 24 '07 #19
In article <5q*************@mid.individual.net>,
Harlan Messinger <hm*******************@comcast.netwrote:
dorayme wrote:
In article <4d***************************@NAXS.COM>,
"Jonathan N. Little" <lw*****@centralva.netwrote:
....
Square brackets are for attribute selectors. A useful but not often used
feature because of IE.
So... are you are implying perhaps that it was anticipated that
the square brackets would have been used more often?

Absolutely, many web designers would love to be able to use
attribute-based selectors.
My very last query was meant to be more specific than perhaps it
sounded. It was not just:

(1) Are you are implying that it was anticipated that the square
brackets would have been used more often than they has turned out
to have been used?

but

(2) Are you are implying perhaps that it was anticipated that
the square brackets would have been used more often than the
curly ones?

--
dorayme
Nov 24 '07 #20
dorayme wrote:
[On counting the shift as a keypress: for a start, you absolutely
need a second hand. <g>]
Must be a Mac minimalist-thinking thing, like that one-button mouse! ;-)

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Nov 24 '07 #21
dorayme wrote:
In article <5q*************@mid.individual.net>,
Harlan Messinger <hm*******************@comcast.netwrote:
>dorayme wrote:
>>In article <4d***************************@NAXS.COM>,
"Jonathan N. Little" <lw*****@centralva.netwrote:
...
>>>Square brackets are for attribute selectors. A useful but not often used
feature because of IE.
So... are you are implying perhaps that it was anticipated that
the square brackets would have been used more often?
Absolutely, many web designers would love to be able to use
attribute-based selectors.

My very last query was meant to be more specific than perhaps it
sounded. It was not just:

(1) Are you are implying that it was anticipated that the square
brackets would have been used more often than they has turned out
to have been used?

but

(2) Are you are implying perhaps that it was anticipated that
the square brackets would have been used more often than the
curly ones?
You might well ask whether it was anticipated, but whether or not it
was, it's clear to me that Jonathan's response didn't imply it. All he
did was point out that they were already dedicated to another purpose.
And it isn't apparent to me that minimizing use of the shift key is
typically a consideration in designing *any* notation. After all, HTML
and XML live and die by the shift-loving less-than and greater-than
characters!
Nov 24 '07 #22
In article <61**************************@NAXS.COM>,
"Jonathan N. Little" <lw*****@centralva.netwrote:
dorayme wrote:
[On counting the shift as a keypress: for a start, you absolutely
need a second hand. <g>]

Must be a Mac minimalist-thinking thing, like that one-button mouse! ;-)
Actually, I was wrong, not "absolutely at all". Sorry. There are
two shift keys and one *can* use the right one and bracket key
with one hand. But! There is an energy cost and it involves the
movement of the thumb in an unnatural manner (as if to fold it
onto the palm of the hand) so that it engages that shift while
the fore or middle finger does the bracket key. This is RSI
territory.

I have to say, Jonathan that I find it very awkward to alt C (and
V) on your keyboard, Command and C (or V) on a Mac are closer
together.

As for this million button mouse business, never felt the need
for more than one button - except if you count the scroll wheel.
Now a scroll wheel is something I have missed on my Mac just
after I have used my winbox and the MS Intellimouse.

(Apple have one out with a minimalistic nipple for a wheel, I am
not that keen on it now that I tried it recently. A wheel is a
wheel! Actually Jonathan, I am just right now about to develop a
pedal mouse that can take over scrolling. If you would like to
invest in the development, please send at least $10. Could become
really big. A wireless pedal mouse from downunder. Don't rush in,
think about it a while.)

--
dorayme
Nov 25 '07 #23
In article <5q*************@mid.individual.net>,
Harlan Messinger <hm*******************@comcast.netwrote:
After all, HTML
and XML live and die by the shift-loving less-than and greater-than
characters!
You are not wrong about this! I will now settle back into simple
acceptance of the situation. <g>

--
dorayme
Nov 25 '07 #24
Joshua Cranmer <Pi*******@verizon.invalidwrites:
dorayme wrote:
>Is there some particular reason that the inventors of CSS chose to
leave us with the legacy of the curly brackets (for which one has to
shift press) rather than the square (for which one simply has to
press)?
<snip>
Anyways, this dates back to a long history of programming languages,
starting with BCPL,
Small detail: BCPL (at least the BCPL compilers I've seen) used $( and $).
upon which it migrated to B,
Yes, by B it had become { and }
C,
and then C allowed ??< and ??and, later, <% and %>!

--
Ben.
Nov 25 '07 #25
On Sun, 25 Nov 2007 01:11:35 +0100, dorayme
<do************@optusnet.com.auwrote:
In article <61**************************@NAXS.COM>,
"Jonathan N. Little" <lw*****@centralva.netwrote:
>dorayme wrote:
[On counting the shift as a keypress: for a start, you absolutely
need a second hand. <g>]

Must be a Mac minimalist-thinking thing, like that one-button mouse! ;-)

Actually, I was wrong, not "absolutely at all". Sorry. There are
two shift keys and one *can* use the right one and bracket key
with one hand. But! There is an energy cost and it involves the
movement of the thumb in an unnatural manner (as if to fold it
onto the palm of the hand) so that it engages that shift while
the fore or middle finger does the bracket key. This is RSI
territory.
That seems quite personal. Years and years ago, in a land far, far away, I
learned I had 10 finger and should use all 10 when typing. This means the
finger located nearest to a button are used. A square bracket for me is
either left-pinky/right pinky or right pinky/ right ringfinger, whichever
is more handy considering the characters typed before and afters. (Ha, it
seems we dutch gave you the word 'pinky'/'pinkie'. Isn't it weird that as
the mmost little one, it's the only non-opposable finger which has it's
own name, instead of 'that kind of' - finger. I'd think the more widely
and intensivly used index finger is far more deserving of a name of its
own....) I don't think I've ever used any finger other than the little
finger to press shift the last years, except for the times I needed a CTRL
key (in which case the ringfinger takes over the shift key).

Hell, I don't think enter has been touched by any other finger then my
right little finger in years, as tab is solely moved by the left pinky...
I have to say, Jonathan that I find it very awkward to alt C (and
V) on your keyboard, Command and C (or V) on a Mac are closer
together.
Hmm, closer together for me usually means more trouble, not less.
--
Rik Wasmus
Nov 25 '07 #26
dorayme wrote:
In article <5q*************@mid.individual.net>,
Harlan Messinger <hm*******************@comcast.netwrote:
>After all, HTML
and XML live and die by the shift-loving less-than and greater-than
characters!

You are not wrong about this! I will now settle back into simple
acceptance of the situation. <g>
Yes, resistance is futile!

Nov 25 '07 #27
dorayme meinte:
p [margin: 0;]

is two key presses shorter then

p {margin: 0;}
Not on my keyboard...

Gregor
--
http://www.gregorkofler.at ::: Landschafts- und Reisefotografie
http://www.licht-blick.at ::: Forum für Multivisionsvorträge
http://www.image2d.com ::: Bildagentur für den alpinen Raum
Nov 25 '07 #28
Fri, 23 Nov 2007 23:22:20 -0500 from Jonathan N. Little
<lw*****@centralva.net>:
dorayme wrote:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?

Square brackets are for attribute selectors. A useful but not often used
feature because of IE.
But it could just as easily have been the other way. Good design
would say to use the shorter keystrokes for the more-commonly-
occurring use.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Nov 25 '07 #29
On 2007-11-25, Stan Brown <th************@fastmail.fmwrote:
Fri, 23 Nov 2007 23:22:20 -0500 from Jonathan N. Little
<lw*****@centralva.net>:
>dorayme wrote:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?

Square brackets are for attribute selectors. A useful but not often used
feature because of IE.

But it could just as easily have been the other way. Good design
would say to use the shorter keystrokes for the more-commonly-
occurring use.
That's good keyboard design, not good syntax design. Syntax should be
designed for clarity and readability, not to be easy to type. If you
don't like typing something then just set up some macros in your editor.
Nov 25 '07 #30
In article <sl*********************@bowser.marioworld>,
Ben C <sp******@spam.eggswrote:
Syntax should be
designed for clarity and readability, not to be easy to type. If you
don't like typing something then just set up some macros in your editor.
Hard to argue with this. About the "just" in "just set up some
macros...", reminds me: On a previous Mac OS I had a very handy
macro program (keyQuencer) but it was not native OS X last time I
looked. On the strictly limited task of sq. versus curly, the
simplest fix would be to reverse the function of that one key.
These days, I use the square brackets nowhere near as often (I
use them for GREP expressions a bit and in footnotes to articles)

--
dorayme
Nov 25 '07 #31
On 24 Nov, 04:02, dorayme <doraymeRidT...@optusnet.com.auwrote:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?

p [margin: 0;]
Force of habit in the software world. {...} is a common indicator for
block structure.

One downside of this is to encourage programmers to think of these as
"CSS blocks", whcih are selected or not as a single unit, owing to the
selector cascade rules. In fact CSS works the other way, by applying
each selector in turn to each individual rule within the block. This
is probably the single most common misunderstanding of CSS use amongst
ex-programmers.
Nov 27 '07 #32
dorayme wrote:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which
one has to shift press) rather than the square (for which one
simply has to press)?

p [margin: 0;]

is two key presses shorter then

p {margin: 0;}

Multiply that by a few billion over the world of css, taking in
to account a lot of consequences including the bigger chance of
typos and revisions, the greater expenditure of energy on
people and processors, more wear and tear on the keyboard.
You got a US centric view of the world. There are other keyboard
layouts than the standard US. And depending on the Layout the
curly braces are shorter to reach than the square brackets.

So what's the big deal? You want to define the elements of a
programming language by a /keyboard layout/? That must be a
joke. I prefer to design programming languages by the way it
looks to me. And in almost all programming languages [...]
denote the index operator, which is definitely something else
than a block structure.

Wolfgang Draxinger
--
E-Mail address works, Jabber: he******@jabber.org, ICQ: 134682867

Nov 27 '07 #33
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:
In article <us************************@textnews.euro.net>,
Sander Tekelenburg <us**@domain.invalidwrote:
[...]
Perhaps on some keyboards
square brackets actually are harder to type.

Well, that is a question, I might be seeing a biassed sample here
in Australia?
Someone else happened to just point me to a web page that shows some
keyboad lay-outs:
<http://docs.info.apple.com/article.html?artnum=304933>. Thought you
might be interested.

--
Sander Tekelenburg, <http://www.euronet.nl/%7Etekelenb/>
Dec 1 '07 #34
In article <us************************@textnews.euro.net>,
Sander Tekelenburg <us**@domain.invalidwrote:
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:
In article <us************************@textnews.euro.net>,
Sander Tekelenburg <us**@domain.invalidwrote:

[...]
Perhaps on some keyboards
square brackets actually are harder to type.
Well, that is a question, I might be seeing a biassed sample here
in Australia?

Someone else happened to just point me to a web page that shows some
keyboad lay-outs:
<http://docs.info.apple.com/article.html?artnum=304933>. Thought you
might be interested.
Thanks Sander.

(Have Germans got something against curly brackets? Could not see
any on their layout?)

--
dorayme
Dec 1 '07 #35
dorayme schrieb:
(Have Germans got something against curly brackets? Could not see
any on their layout?)
As I wrote earlier in this thread, my german (added: non-Mac) keyboard
has a '{' on AltGr + 7.
--
Johannes Koch
Spem in alium nunquam habui praeter in te, Deus Israel.
(Thomas Tallis, 40-part motet)
Dec 1 '07 #36
On Sun, 2 Dec 2007, dorayme wrote:
User-Agent: MT-NewsWatcher/3.5.1 (Intel Mac OS X)

(Have Germans got something against curly brackets? Could not see
any on their layout?)
Apple Bavaria ignores the German standard DIN 2137 for keyboard
layouts. On standard German keyboards, you find { } on 7 9
and [ ] on 8 9 .

--
¹ superscript 1 ¼ fraction 1/4 Ð D stroke ð d stroke
² superscript 2 ½ fraction 1/2 Þ Thorn þ thorn
³ superscript 3 ¾ fraction 3/4 Ý Y acute ý y acute
× multiply sign ¦ broken bar
Dec 4 '07 #37
On Tue, 4 Dec 2007, I wrote:
Apple Bavaria ignores the German standard DIN 2137 for keyboard
layouts. On standard German keyboards, you find { } on 7 9
and [ ] on 8 9 .
Sorry - typo. I meant { } on 7 0 .

7 8 9 0
{ [ ] }

--
Bugs in Internet Explorer 7
http://www.unics.uni-hannover.de/nhtcapri/ie7-bugs
Dec 4 '07 #38

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

Similar topics

21
by: deko | last post by:
Do I need to use curly brackets in PHP if .. else statements? other constructs? Does it matter? What are Best Practices? Why? thanks in advance... This seems to work WITHOUT curly brackets:...
3
by: Eric Ellsworth | last post by:
Hi all, Does anyone have any bright ideas for Access' tendency to add square brackets when it parses queries, then tell you that the query syntax is invalid. In my case, I'm trying to do a LEFT...
7
by: Brian Henry | last post by:
i was just looking at the tcplistener example on the MSDN docs and saw this Dim bytes(1024) As Dim data As = Nothing the data types ar ein brackets, what is the significance of the brackets?...
1
by: Greg Strong | last post by:
Hello All, Why would brackets be added to the SQL of a pass through query to Oracle? If I paste the debug print of the SQL statement into SQLPlus of Oracle's XE edition it works, and does NOT...
4
by: Nunzio | last post by:
I am trying to build an email address in PHP code using v5.1.2. All works well until I try to surround the email address with angle brackets. Every method I try causes the email address to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.