HighDots Forums  

Brackets and the Invention of CSS

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Brackets and the Invention of CSS in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dorayme
 
Posts: n/a

Default Brackets and the Invention of CSS - 11-23-2007 , 10:02 PM






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

Reply With Quote
  #2  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Brackets and the Invention of CSS - 11-23-2007 , 10:22 PM






dorayme wrote:
Quote:
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


Reply With Quote
  #3  
Old   
dorayme
 
Posts: n/a

Default Re: Brackets and the Invention of CSS - 11-23-2007 , 10:30 PM



In article <4d20a$4747a6f9$40cba7b4$15326 (AT) NAXS (DOT) COM>,
"Jonathan N. Little" <lws4art (AT) centralva (DOT) net> wrote:

Quote:
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


Reply With Quote
  #4  
Old   
Sander Tekelenburg
 
Posts: n/a

Default Re: Brackets and the Invention of CSS - 11-23-2007 , 10:53 PM



In article
<doraymeRidThis-22C5FE.15022624112007 (AT) news-vip (DOT) optusnet.com.au>,
dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:

Quote:
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.

Quote:
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/>


Reply With Quote
  #5  
Old   
Chris F.A. Johnson
 
Posts: n/a

Default Re: Brackets and the Invention of CSS - 11-23-2007 , 11:45 PM



On 2007-11-24, dorayme wrote:
Quote:

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.

Quote:
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)


Reply With Quote
  #6  
Old   
Sherman Pendley
 
Posts: n/a

Default Re: Brackets and the Invention of CSS - 11-23-2007 , 11:53 PM



dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> writes:

Quote:
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


Reply With Quote
  #7  
Old   
dorayme
 
Posts: n/a

Default Re: Brackets and the Invention of CSS - 11-24-2007 , 12:20 AM



In article <user-1DA0ED.05534024112007 (AT) textnews (DOT) euro.net>,
Sander Tekelenburg <user (AT) domain (DOT) invalid> wrote:

Quote:
In article
doraymeRidThis-22C5FE.15022624112007...ptusnet.com.au>,
dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> 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)?

Perhaps to build upon existing conventions.
Which were?

Quote:
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?

Quote:
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


Reply With Quote
  #8  
Old   
dorayme
 
Posts: n/a

Default Re: Brackets and the Invention of CSS - 11-24-2007 , 12:38 AM



In article <pcqk15-tvq.ln1 (AT) xword (DOT) teksavvy.com>,
"Chris F.A. Johnson" <cfajohnson (AT) gmail (DOT) com> wrote:

Quote:
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></h1> with 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>

Quote:
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


Reply With Quote
  #9  
Old   
dorayme
 
Posts: n/a

Default Re: Brackets and the Invention of CSS - 11-24-2007 , 12:48 AM



In article <m1fxywnq98.fsf (AT) dot-app (DOT) org>,
Sherman Pendley <spamtrap (AT) dot-app (DOT) org> wrote:

Quote:
dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> writes:

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


Reply With Quote
  #10  
Old   
Ben C
 
Posts: n/a

Default Re: Brackets and the Invention of CSS - 11-24-2007 , 04:33 AM



On 2007-11-24, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:
Quote:
In article <user-1DA0ED.05534024112007 (AT) textnews (DOT) euro.net>,
Sander Tekelenburg <user (AT) domain (DOT) invalid> wrote:

In article
doraymeRidThis-22C5FE.15022624112007...ptusnet.com.au>,
dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> 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)?

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.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.